simulink参考模板_第1页
simulink参考模板_第2页
simulink参考模板_第3页
simulink参考模板_第4页
simulink参考模板_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Simulink部分Unit delyInherited 继承的。Initial conditions 初始值;设定延迟的时间段内的函数值。改变scope中的decimation的值会改变延迟的时间。Ground当某个模块要求有输入而实际没有加输入的时候,系统提示出错,此时接入Ground模块,避免错误的发生,同时Ground输出零。Terminator此模块与Ground对应,当输出没有的时候接入,可以避免系统提示错误。Conwert此模块可以转换输入数据的类型,转换的类型根据输出的类型而定。Product令输入的数据相乘。Saturation此模块设定upper limite和lower

2、limite限制输出值,如果输入在此区间内,则输出该值,反之输入>upper limite,输出upper limite;输入<lower limite 则输出lower limite。Transfer Fcn此模块利用拉氏变换,模块的算式为传递函数,输出自动变为时间域内的函数。Integrator此为直接的积分模块,原理也是拉氏变换。PID Controller此模块为PID控制算法。输入值为a,则输出为a(t+1)PID Controller (2DOF)此模块和PID Controller相似。利用Ref一端的值减去PID一端的值,之后×(t+1)。Transpor

3、t Delay此模块是将输入信号延迟一段时间,通过Time delay可以设置具体的延后时间。Variable Time Delay此模块和Transport Delay类似,上端输入信号,下端输入希望的延迟时间。注意:在Variable Time Delay中设置有Maximum delay它可以限制输入的希望延迟时间。如果设定值> Maximum delay,延迟时间为Maximum delay;否则延迟时间为自己的设定值。Zero-Pole相当于传达函数为,求输出就可以了。Zero-Pole此模块可以用来产生不规则的方波。设置Deadband width,其关于原点对称。Initi

4、al output初始值。此模块可以限制输入信号的峰值。输出值的峰值=输入值的峰值Deadband width/2,输入函数的值大于这一值的时候,输出信号保持自己的峰值不变。否则延迟一段时间后跟随其一起变化。1 / 8Dead Zone该模块通过设置Start of dead zone和End of dead zone,令输入函数与其进行比较,在该区间的直接输出零,大于dead zone最大值的,变为最大值dead zone的最大值的绝对值;小于dead zone最小值的,变为最小值+dead zone的最小值的绝对值。Hit Crossing通过设置Hit crossing offset,使

5、得当输入达到该值时输出发生冲激。Hit crossing direction有三种选择:rising、falling、either分别表示当输入遇到Hit crossing offset的值且处在上升沿(下降沿,二者均有)时发生冲激。Rate Limiteru(i) and t(i) are the current block input and time, and y(i-1) and t(i-1) are the output and time at the previous step. The output is determined by comparing rate to the R

6、ising slew rate and Falling slew rate parameters:If rate is greater than the Rising slew rate parameter (R), the output is calculated asIf rate is less than the Falling slew rate parameter (F), the output is calculated asIf rate is between the bounds of R and F, the change in output is equal to the

7、change in input:Relay四个参数:Switch on point,Switch off point,Output when on:,Output when off输出显示两个值:Output when on和Output when off。When the relay is on, it remains on until the input drops below the value of the Switch off point parameter. When the relay is off, it remains off until the input exceeds

8、the value of the Switch on point parameter.Note :初始输入值在 Switch off point 与 Switch on point 之间, 输出为Output when off的数值。Saturation Dynamic包含:up 、u、lo三项输入,当输入大于up值时,输出值为up的值,输入小于lo的值时输出为lo的值,输入介于二者之间是输出u的值。Coulomb & Viscous Friction输出函数y = sign(u) * (Gain * abs(u) + Offset)u为输出,offset用户自己设定值:a

9、b c d;abs为取绝对值;sigh为符号函数。Gain为增益。Quantizery = q * round(u/q)y为输出,u为输入,q为设置的Quantization interval值。Round()函数为取整数。主要是将连续输入的信号变为阶梯变化的信号。阶梯每次增加或减少的值为qRate Limiter Dynamic其中三输入:up、u、lo。当输入函数的变化率在up和lo之间的时候以输入函数的初值为初值,上升阶段的变化率为up的值,下降阶段的变化率为lo的值;输入函数的变化率超过up和lo的范围,则按照输入函数变化。注:此模块的步频为定值,不能是变步长的。Saturation设

10、定Upper limit 、Lower limit:的值,当输入在此之间的时候输出等于输入;输入在此区间之外的时候输出为Upper limit 、Lower limit。Wrap To Zero当输入值大于Threshold值时,输出为0,否则输出原函数的值。Discrete Derivativewhere u(tn) and y(tn) are the block's input and output at the current time step, respectively, u(tn-1)is the block's input at the previous time

11、 step, K is a scaling factor, and Ts is the simulation's discrete step size, which must be fixed. Logic and Bit OperationsCompare To Zero与0进行比较,当为真时输出1,假时输出0;Compare To Constant同上:当输入>constant时输出1,否则为0;Detect Change判断输入函数的值是否等于前一个时刻的值,如果不相等则为1,相等则为0Detect Decrease1比较输入值是否小于前一个时刻的值,小于则为1,大于则为0

12、 即函数增加则为0,减小则为1Detect Decrease1当输入值<0,且前一时刻输入值>=0,则输出值为1;否则输出为0.Detect Fall Nonpositive输入值<=0且前一时刻的输入值>0则输出为1;否则输出为0。Detect Increase输入值大于前一时刻的输入值,输出为1,否则为0。Interval Test当输入值介于Upper limit和Lower limit之间时,为真,输出1,否则输出0.Interval Test Dynamic与上面的模块一致,只是Upper limit,Lower limit是外部设定的。Siney=sin(2

13、*pi*u)其中u为输入函数,y为输出函数。Cosine与Sine模块的意义是一样的。Lookup Table (2-D)此模块中有一个矩阵,输入值非别值矩阵的行和列,对应行和列输出矩阵中的值。Math Operations函数部分:常用命令:1.hold:保持原有图像,进行相关操作; 分为hold on 和hold off2. A=1:4;5:8 pow2(A) ans = 2 4 8 1632 64 128 256Pow2(A)表示A的项扩大2倍,A的后项总是前项的2倍。Pow2(B,A)表示B*Pow2(A)。其总Pow2(A)也可以表示成2.A。不同赋值方式示例。A=zeros(2,4) A = 0 0 0 0 0 0 0 0 A(:)=1:8 A = 1 3 5 7 2 4 6 8 s=2 3 5;A(s)Sa=10 20 30'A(s)=Sa ans = 2 3 5Sa = 10 20 30A = 1 20 30 7 10 4 6 8 其中的A(s)的顺序是按照列的顺序查询的,由上而下。零矩阵:ze

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论