1.启动simulink
命令行输入simulink或者

会弹出

2,点击blank model,出现新窗口


新建或者打开模型文件

There are two major classes of items in Simulink: blocks and lines. Blocks are used to generate, modify, combine, output, and display signals. Lines are used to transfer signals from one block to another.

There are several general classes of blocks within the Simulink library:

Sources: used to generate various signals
Sinks: used to output or display signals
Continuous: continuous-time system elements (transfer functions, state-space models, PID controllers, etc.)
Discrete: linear, discrete-time system elements (discrete transfer functions, discrete state-space models, etc.)
Math Operations: contains many common math operations (gain, sum, product, absolute value, etc.)
Ports & Subsystems: contains useful blocks to build a system


RUN

添加block,修改transfer function


run

继续修改transfer function


Since the new transfer function has a very fast response, it compressed into a very narrow part of the scope window. This is not really a problem with the scope, but with the simulation itself. Simulink simulated the system for a full ten seconds even though the system had reached steady state shortly after one second.

To correct this, you need to change the parameters of the simulation itself. In the model window, select Model Configuration Parameters from the Simulation menu. You will see the following dialog box.


There are many simulation parameter options; we will only be concerned with the start and stop times, which tell Simulink over what time period to perform the simulation. Change Start time from 0.0 to 0.8 (since the step doesn’t occur until t = 1.0). Change Stop time from 10.0 to 2.0, which should be only shortly after the system settles. Close the dialog box and rerun the simulation. Now, the scope window should provide a much better display of the step response as shown below.

Building Systems

First, you will gather all of the necessary blocks from the block libraries. Then you will modify the blocks so they correspond to the blocks in the desired model. Finally, you will connect the blocks with lines to form the complete system. After this, you will simulate the complete system to verify that it works.

Gathering Blocks

Follow the steps below to collect the necessary blocks:

Create a new model (New from the File menu or hit Ctrl-N). You will get a blank model window.
Click on the Tools tab and then select Library Browser.
Then click on the Sources listing in the Simulink library browser.


This will bring up the Sources block library. Sources are used to generate signals.

Drag the Step block from the Sources window into the left side of your model window.

Click on the Math Operations listing in the main Simulink window.
From this library, drag a Sum and Gain block into the model window and place them to the right of the Step block in that order.
Click on the Continuous listing in the main Simulink window.
First, from this library, drag a PID Controller block into the model window and place it to the right of the Gain block.
From the same library, drag a Transfer Function block into the model window and place it to the right of the PID Controller block.


Click on the Sinks listing in the main Simulink window.
Drag the Scope block into the right side of the model window.


Modify Blocks

Double-click on the Sum block. Since you will want the second input to be subtracted, enter ± into the list of signs field. Close the dialog box.
Double-click the Gain block. Change the gain to 2.5 and close the dialog box.
Double-click the PID Controller block and change the Proportional gain to 1 and the Integral gain to 2. Close the dialog box.
Double-click the Transfer Function block. Leave the numerator [1], but change the denominator to [1 2 4]. Close the dialog box. The model should appear as:
Change the name of the PID Controller block to PI Controller by double-clicking on the word PID Controller.
Similarly, change the name of the Transfer Function block to Plant. Now, all the blocks are entered properly. Your model should appear as:

Drag the mouse from the output terminal of the Step block to the positive input of the Sum input. Another option is to click on the Step block and then Ctrl-Click on the Sum block to connect the two togther. You should see the following.

Drag a line off the negative portion of the Sum block straight down and release the mouse so the line is incomplete. From the endpoint of this line, click and drag to the line between the Plant and the Scope. The model should now appear as follows.

以上照做后可能会报错

解决方法就是


解决

参数可以用代数代替
In some cases, parameters, such as gain, may be calculated in MATLAB to be used in a Simulink model. If this is the case, it is not necessary to enter the result of the MATLAB calculation directly into Simulink. For example, suppose we calculated the gain in MATLAB in the variable K. Emulate this by entering the following command at the MATLAB command prompt.



也可以run

simulink教程(自动控制原理)相关推荐

  1. matlab 控制硬件,自动控制原理实验教程(硬件模拟与MATLAB仿真)

    前言 第1章 MATLAB7.1与Simulink6.1入门基础 1.1 自动控制原理与系统仿真简述 1.1.1 自动控制原理模拟实验系统 1.1.2 控制系统仿真 1.2 控制系统MATLAB7.1 ...

  2. 卢京潮自动控制原理ppt_独家资料|29套输配电相关视频教程+PPT课件 ,全方位讲解电气传动自动控制系统、供配电实用技术、自动控制原理,免费领!...

    输配电前沿一直以致力于成为输配电领域的百科全书,以输配电知识资源传播共享为目标,为输配电资源高效共享提供最丰富的知识信息资源和最有效的知识传播与学习平台. 为了给大家提供高价值的全套视频教程,倔老头为 ...

  3. 自控matlab设计,自动控制原理课程设计--基于MATLAB软件的自动控制系统仿真

    自动控制原理课程设计--基于MATLAB软件的自动控制系统仿真 < 自动控制原理 >课程设计说 明 书日期: 2012.5.21-2012.6.1 自动控制原理 课程设计评阅书题目 基于 ...

  4. 关于汽车悬挂系统减震控制的进一步研究(自动控制原理课程设计小论文)

    摘要 随着社会的进步.科技的发展,人们生活水平不断提高,乘坐车辆的频率增多,对于汽车乘坐舒适性的要求也越来越高.另一方面,由于最近几年国内外汽车制造业的迅猛发展,汽车制造业的竞争也日益激烈,各个汽车制 ...

  5. matlab创新开放性实验,基于MATLAB 的自动控制原理实验仿真系统的设计

    基于MATLAB 的自动控制原理实验仿真系统的设计 基于MATLAB 的自动控制原理实验仿真系统的设计 田晴,张茁 (河北联合大学电气工程学院,河北唐山063000) 摘要:MATLAB的图形用户界面 ...

  6. 自动控制matlab实验,自动控制原理MATLAB实验报告.doc

    自动控制原理MATLAB实验报告 实验一 控制系统数学模型的Matlab实现 一.实验目的 二.实验环境及仪器 五.思考题 实验一 控制系统数学模型的Matlab实现 一.实验目的 二.实验环境及仪器 ...

  7. matlab知识点PPT,自动控制原理知识点归纳ppt课件

    PPT内容 这是自动控制原理知识点归纳ppt课件下载,主要介绍了自动控制系统基本控制形式:开环控制和闭环控制的优缺点比较:自动控制系统的组成:自动控制系统中传递的信号:线性系统微分方程的建立方法,欢迎 ...

  8. 基于Atmel 51单片机开发平台和自动控制原理的数字电压表系统

    基于Atmel 51单片机开发平台和自动控制原理的数字电压表系统 ///插播一条:我自己在今年年初录制了一套还比较系统的入门单片机教程,想要的同学找我拿就行了免費的,私信我就可以哦~点我头像黑色字体加 ...

  9. 【自动控制原理】以弹簧振动系统(典型二阶系统)为例理解系统微分方程与传递函数、控制框图的关系,闭环极点与稳定性的关系

    [零]   我始终认为,开始学习一门课程之前,首先要知道这门课程的实际用处或者为什么有这门课程,如果不了解这些,在学习的过程中往往会存在诸多疑问,也很难对这门课程产生兴趣,这也是我们推崇在实践中学习的 ...

  10. 自动控制原理matlab实验,自动控制原理MATLAB实验报告[稻谷书苑]

    <自动控制原理MATLAB实验报告[稻谷书苑]>由会员分享,可在线阅读,更多相关<自动控制原理MATLAB实验报告[稻谷书苑](15页珍藏版)>请在人人文库网上搜索. 1.实验 ...

最新文章

  1. 七夕-探探小卡片鸿蒙版
  2. ASC2 E Quantization Problem DP
  3. 1-添加自己的Lua执行函数(ESP8266-SDK开发(lua版本))
  4. 创建系统镜像_学会这些, 操作docker image镜像就够了!
  5. 2021-11-14
  6. 斯坦福和伯克利都在用的线性代数教材,现在可以免费下载了
  7. linux raid 卡日志,Linux系统下RAID卡异常日志收集方法、系统及存储介质与流程
  8. 怎么更改wifi频段_wifi信道和频段怎么设置?
  9. 残差网络(Residual Network),残差连接(skip-connect)
  10. 【muduo】TcpClient与TcpServer建立连接过程对比
  11. 详解Nginx Rewrite标记last和break的区别
  12. tomcat中运行PHP项目
  13. Qt 5.7设置调试器
  14. ggplot2设置坐标轴范围_6.2 坐标轴:对连续变量设置坐标轴显示范围
  15. Java 中的设计模式详细介绍
  16. 关于layer.open()弹出页面与”父页面“之间获取数据赋值给页面Element的问题
  17. jsPDF生成PDF文件,文件不全问题,后台进行文件下载,前台不下载
  18. mysql 金额_Mysql中金额使用DECIMAL类型
  19. 爬虫——记一次奇妙的异步请求爬取
  20. React-native实现联系人列表分组组件

热门文章

  1. 内存、磁盘硬盘、软盘、光盘、磁盘驱动器的介绍
  2. 唯一标识 微信小程序_微信小程序中用户唯一ID的获取
  3. iOS开发-iPhone屏幕尺寸
  4. 批处理删除文件夹下所有文件和文件夹
  5. 点击按钮显示明文密码
  6. linux虚拟实验室关闭了,Linux在线虚拟云实验室,提升RHCE考试通过率
  7. 使用阿里云服务器搭建自己的个人网站
  8. 项目版本更新,浏览器缓存问题解决方案
  9. HMM隐马尔可夫模型-通俗易懂
  10. 这次,华为选择了湖南大学、湘潭大学