lsim和rlocus函数实例.docx

上传人:聆听****声音 文档编号:1977624 上传时间:2023-05-02 格式:DOCX 页数:11 大小:1.01MB
下载 相关 举报
lsim和rlocus函数实例.docx_第1页
第1页 / 共11页
lsim和rlocus函数实例.docx_第2页
第2页 / 共11页
lsim和rlocus函数实例.docx_第3页
第3页 / 共11页
lsim和rlocus函数实例.docx_第4页
第4页 / 共11页
lsim和rlocus函数实例.docx_第5页
第5页 / 共11页
lsim和rlocus函数实例.docx_第6页
第6页 / 共11页
lsim和rlocus函数实例.docx_第7页
第7页 / 共11页
lsim和rlocus函数实例.docx_第8页
第8页 / 共11页
lsim和rlocus函数实例.docx_第9页
第9页 / 共11页
lsim和rlocus函数实例.docx_第10页
第10页 / 共11页
lsim和rlocus函数实例.docx_第11页
第11页 / 共11页
亲,该文档总共11页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

lsim和rlocus函数实例.docx

《lsim和rlocus函数实例.docx》由会员分享,可在线阅读,更多相关《lsim和rlocus函数实例.docx(11页珍藏版)》请在冰点文库上搜索。

lsim和rlocus函数实例.docx

Matlab和Simulink训练题1

在matlab下键入help simulink; simulink;helprlocus; help lsim等命令,学习各种函数的用法。

给定下列6个系统,

(1)利用simulink建立其模型,当输入为u(t)=2sint; u(t)=sin(t+p/3);u(t)=sin2t;u(t)=sin(2t+p/3);u(t)=sin3t; u(t)=sin(3t+p/3);u(t)=sin10t;u(t)=2sin(10t+p/3)时计算各个模型的输出,在图形中展示。

比较对应的输入输出曲线,能发现什么规律?

计算Gi(jw)的值,其中i=1,…,6;w分别等于1,2,3,10。

(2)利用rlocus汇出6个传递函数的根轨迹曲线。

提示:

题目

(1)既可由lsim完成,也可由simulink完成,建议两者都试一下,比较优劣。

答:

模型建立

t=0:

0.01:

10;

u1=2*sin(t);u2=sin(t+3.1415926/3);

u3=sin(2*t);u4=sin(2*t+3.1415926/3);

u5=sin(3*t);u6=sin(3*t+3.1415926/3);

u7=sin(10*t);u8=2*sin(10*t+3.1415926/3);G1=tf(1,[11])

G2=tf(1,[111])

G3=tf([-11],[121])

G4=tf([-11],[111])

G5=tf([1

-2

1],[1

3

3

1])

G6=tf([1

-2

1],[1

2

2

1])

得:

1.利用simulink建立其模型

G1:

G2:

G3:

G4:

G5:

G6:

2.各个模型的输出,在图形中展示。

G1:

红色G2:

蓝色 G3:

绿色 G4:

黑色G5:

黄色 G6:

紫色u1~u8灰色

U1:

u1=2sin(t)

>>lsim(G1,'r',G2,'b',G3,'g',G4,'k',G5,'y',G6,'m',u1,t)

>>grid

LinearSimulationResults

3

2

1

Amplitude

0

-1

-2

-3

0 1 2 3 4 5 6 7 8 9 10

Time(seconds)

U2:

>>lsim(G1,'r',G2,'b',G3,'g',G4,'k',G5,'y',G6,'m',u2,t)

>>grid

1.5

1

0.5

Amplitude

0

-0.5

-1

-1.5

LinearSimulationResults

0 1 2 3 4 5 6 7 8 9 10

Time(seconds)

U3:

>>lsim(G1,'r',G2,'b',G3,'g',G4,'k',G5,'y',G6,'m',u3,t)

>> grid

1

0.8

0.6

0.4

Amplitude

0.2

0

-0.2

-0.4

-0.6

-0.8

-1



LinearSimulationResults

0 1 2 3 4 5 6 7 8 9 10

Time(seconds)

U4:

>>lsim(G1,'r',G2,'b',G3,'g',G4,'k',G5,'y',G6,'m',u4,t)

>>grid

1

0.8

0.6

0.4

Amplitude

0.2

0

-0.2

-0.4

-0.6

-0.8

-1

LinearSimulationResults

0 1 2 3 4 5 6 7 8 9 10

Time(seconds)

U5:

>>lsim(G1,'r',G2,'b',G3,'g',G4,'k',G5,'y',G6,'m',u5,t)

>>grid

1

0.8

0.6

0.4

Amplitude

0.2

0

-0.2

-0.4

-0.6

-0.8

-1

LinearSimulationResults

0 1 2 3 4 5 6 7 8 9 10

Time(seconds)

U6:

>>lsim(G1,'r',G2,'b',G3,'g',G4,'k',G5,'y',G6,'m',u6,t)

>>grid

1

0.8

0.6

0.4

Amplitude

0.2

0

-0.2

-0.4

-0.6

-0.8

-1



LinearSimulationResults

0 1 2 3 4 5 6 7 8 9 10

Time(seconds)

3.比较对应的输入输出曲线,能发现什么规律?

4.Gi(jw)的值,其中i=1,…,6;w分别等于1,2,3,10。

G1(j):

G1(2j):

G1(3j):

G1(10j):

G2:



G2(j):

G2(2j):

G2(3j):

G2(10j)

G3(j) G3(2j) G3(3j) G3(10j)

G4(j) G4(j) G4(j) G4(j)

G5(j) G5(j) G5(j) G5(j)

G6(j) G6(j) G6(j) G6(j)

5.利用rlocus汇出6个传递函数的根轨迹曲线。

G1:

>>rlocus(G1)

RootLocus

0.2

ImaginaryAxis(seconds-1)

0.1

0

-0.1

-0.2

-4 -3 -2 -1 0 1

G2:

>>rlocus(G2,'r'')

RootLocus

4

ImaginaryAxis(seconds-1)

2

0

-2

G3:

-4

-1 -0.8 -0.6



-0.4 -0.2 0 0.2 0.4

RootLocus

3

ImaginaryAxis(seconds-1)

2

1

0

-1

-2

-3

-2 0 2 4 6 8

G4:

RootLocus

2

ImaginaryAxis(seconds-1)

1

0

-1

-2

-1 0 1 2 3 4 5 6

G5:

RootLocus

1

-1

ImaginaryAxis(seconds)

0.5

0

-0.5

-1

-3 -2 -1 0 1 2

G6:

RootLocus

1

-1

ImaginaryAxis(seconds)

0.5

0

-0.5

-1

-3 -2 -1 0 1 2

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > IT计算机 > 电脑基础知识

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2