机械振动单自由度系统模拟分析附matlab代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信       无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机 

⛄ 内容介绍

本程序可以模拟单自由度系统小球的振动过程,分自由振动和强迫振动两部分,其中自由振动又可分有阻尼和无阻尼。

在自由振动过程中,可根据给定参数,计算机械振动的相关公式,绘制机械振动曲线,并对小球振动过程进行动画模拟。

在强迫振动过程中,可根据给定参数,计算机械振动相关公式,对正弦激励时的强迫振动及伴随强迫振动的自由振动进行绘制,并将该模型作为典型二阶系统进行控制系统分析,如Bode图,Nyquist图的绘制。此外,还添加了LTI View,SISO及Simulink模块,可利用matlab自带工具箱对该二阶系统进行深入分析。

⛄ 部分代码

<span style="color:#333333"><span style="background-color:#fafafa"><code>function varargout = chuangkou(varargin)</code><code><span style="color:#afafaf">%</span> CHUANGKOU M-file <span style="color:#ca7d37">for</span> chuangkou.fig</code><code><span style="color:#afafaf">%</span>      CHUANGKOU, by itself, creates a new CHUANGKOU or raises the existing</code><code><span style="color:#afafaf">%</span>      singleton*.</code><code><span style="color:#afafaf">%</span></code><code><span style="color:#afafaf">%</span>      H = CHUANGKOU returns the handle to a new CHUANGKOU or the handle to</code><code><span style="color:#afafaf">%</span>      the existing singleton*.</code><code><span style="color:#afafaf">%</span></code><code><span style="color:#afafaf">%</span>      CHUANGKOU(<span style="color:#dd1144">'CALLBACK'</span>,hObject,eventData,handles,...) calls the <span style="color:#ca7d37">local</span></code><code><span style="color:#afafaf">%</span>      <span style="color:#ca7d37">function</span> named CALLBACK <span style="color:#ca7d37">in</span> CHUANGKOU.M with the given input arguments.</code><code><span style="color:#afafaf">%</span></code><code><span style="color:#afafaf">%</span>      CHUANGKOU(<span style="color:#dd1144">'Property'</span>,<span style="color:#dd1144">'Value'</span>,...) creates a new CHUANGKOU or raises the</code><code><span style="color:#afafaf">%</span>      existing singleton*.  Starting from the left, property value pairs are</code><code><span style="color:#afafaf">%</span>      applied to the GUI before chuangkou_OpeningFcn gets called.  An</code><code><span style="color:#afafaf">%</span>      unrecognized property name or invalid value makes property application</code><code><span style="color:#afafaf">%</span>      stop.  All inputs are passed to chuangkou_OpeningFcn via varargin.</code><code><span style="color:#afafaf">%</span></code><code><span style="color:#afafaf">%</span>      *See GUI Options on GUIDE<span style="color:#dd1144">'s Tools menu.  Choose "GUI allows only one</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144">      instance to run (singleton)".</span></code><code><span style="color:#afafaf">%</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> See also: GUIDE, GUIDATA, GUIHANDLES</span></code><code>%<span style="color:#dd1144"> Edit the above text to modify the response to help chuangkou</span></code><code>%<span style="color:#dd1144"> Last Modified by GUIDE v2.5 03-Jun-2011 19:01:43</span></code><code>%<span style="color:#dd1144"> Begin initialization code - DO NOT EDIT</span></code><code>gui_Singleton = 1;</code><code>gui_State = struct('gui_Name',       mfilename, ...</code><code>                   'gui_Singleton',  gui_Singleton, ...</code><code>                   'gui_OpeningFcn', @chuangkou_OpeningFcn, ...</code><code>                   'gui_OutputFcn',  @chuangkou_OutputFcn, ...</code><code>                   'gui_LayoutFcn',  [] , ...</code><code>                   'gui_Callback',   []);</code><code>if nargin && ischar(varargin{1})</code><code>    gui_State.gui_Callback = str2func(varargin{1});</code><code>end</code><code>​</code><code>if nargout</code><code>    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});</code><code>else</code><code>    gui_mainfcn(gui_State, varargin{:});</code><code>end</code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> End initialization code - DO NOT EDIT</span></code><code>​</code><code>%<span style="color:#dd1144"> --- Executes just before chuangkou is made visible.</span></code><code>function chuangkou_OpeningFcn(hObject, eventdata, handles, varargin)</code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> This function has no output args, see OutputFcn.</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> hObject    handle to figure</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> eventdata  reserved - to be defined in a future version of MATLAB</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> handles    structure with handles and user data (see GUIDATA)</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> varargin   command line arguments to chuangkou (see VARARGIN)</span></code><code>%<span style="color:#dd1144"> Choose default command line output for chuangkou</span></code><code>handles.output = hObject;</code><code>%<span style="color:#dd1144"> Update handles structure</span></code><code>guidata(hObject, handles);</code><code>%<span style="color:#dd1144"> UIWAIT makes chuangkou wait for user response (see UIRESUME)</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> uiwait(handles.figure1);</span></code><code>​</code><code>%<span style="color:#dd1144"> --- Outputs from this function are returned to the command line.</span></code><code>function varargout = chuangkou_OutputFcn(hObject, eventdata, handles) </code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> varargout  cell array for returning output args (see VARARGOUT);</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> hObject    handle to figure</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> eventdata  reserved - to be defined in a future version of MATLAB</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> handles    structure with handles and user data (see GUIDATA)</span></code><code>%<span style="color:#dd1144"> Get default command line output from handles structure</span></code><code>varargout{1} = handles.output;</code><code>​</code><code>%<span style="color:#dd1144"> --- Executes on button press in radiobutton1.</span></code><code>function radiobutton1_Callback(hObject, eventdata, handles)</code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> hObject    handle to radiobutton1 (see GCBO)</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> eventdata  reserved - to be defined in a future version of MATLAB</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> handles    structure with handles and user data (see GUIDATA)</span></code><code>%<span style="color:#dd1144"> Hint: get(hObject,'</span>Value<span style="color:#dd1144">') returns toggle state of radiobutton1</span></code><code>​</code><code>%<span style="color:#dd1144"> --- Executes on button press in radiobutton2.</span></code><code>function radiobutton2_Callback(hObject, eventdata, handles)</code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> hObject    handle to radiobutton2 (see GCBO)</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> eventdata  reserved - to be defined in a future version of MATLAB</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> handles    structure with handles and user data (see GUIDATA)</span></code><code>%<span style="color:#dd1144"> Hint: get(hObject,'</span>Value<span style="color:#dd1144">') returns toggle state of radiobutton2</span></code><code>%<span style="color:#dd1144">主程序</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> --- Executes on button press in pushbutton1.</span></code><code>function pushbutton1_Callback(hObject, eventdata, handles)</code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> hObject    handle to pushbutton1 (see GCBO)</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> eventdata  reserved - to be defined in a future version of MATLAB</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> handles    structure with handles and user data (sese GUIDATA)</span></code><code>a=get(handles.radiobutton1,'value');</code><code>b=get(handles.radiobutton2,'value');</code><code>if a==1</code><code>    close('chuangkou');</code><code>    run('ziyouzhendong');</code><code>elseif b==1</code><code>    close('chuangkou');</code><code>    run('qiangpozhendong');</code><code>end</code><code>%<span style="color:#dd1144"> --- Executes on button press in pushbutton2.</span></code><code>function pushbutton2_Callback(hObject, eventdata, handles)</code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> hObject    handle to pushbutton2 (see GCBO)</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> eventdata  reserved - to be defined in a future version of MATLAB</span></code><code><span style="color:#afafaf">%</span><span style="color:#dd1144"> handles    structure with handles and user data (see GUIDATA)</span></code><code>close</code><code>​</code></span></span>

⛄ 运行结果

⛄ 参考文献

[1] 蒋志峰,楼易.用MATLAB进行单自由度系统机械振动试验[J].力学与实践, 2004, 26(3):3.DOI:10.3969/j.issn.1000-0879.2004.03.031.

[2] 艾金婷,富立,郑玉.库仑摩擦对机械振动的影响[J].长春理工大学学报:自然科学版, 2014(2):4.DOI:10.3969/j.issn.1672-9870.2014.02.013.

[3] 孙向阳,曾山.基于MATLAB6的振动问题的模拟演示[J].武汉工业学院学报, 2003, 22(4):4.

  • ⛳️ 代码获取关注我
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料

🍅 仿真咨询

1.卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断
2.图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知
3.旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划
4.无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配
5.传感器部署优化、通信协议优化、路由优化、目标定位
6.信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号
7.生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化
8.微电网优化、无功优化、配电网重构、储能配置
9.元胞自动机交通流 人群疏散 病毒扩散 晶体生长

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

Matlab科研辅导帮

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

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

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

打赏作者

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

抵扣说明:

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

余额充值