matlab期末大作业.docx

上传人:b****3 文档编号:3938589 上传时间:2022-11-26 格式:DOCX 页数:20 大小:417.30KB
下载 相关 举报
matlab期末大作业.docx_第1页
第1页 / 共20页
matlab期末大作业.docx_第2页
第2页 / 共20页
matlab期末大作业.docx_第3页
第3页 / 共20页
matlab期末大作业.docx_第4页
第4页 / 共20页
matlab期末大作业.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

matlab期末大作业.docx

《matlab期末大作业.docx》由会员分享,可在线阅读,更多相关《matlab期末大作业.docx(20页珍藏版)》请在冰豆网上搜索。

matlab期末大作业.docx

matlab期末大作业

 

ModernControlSystems

AnalysisandDesign

UsingMatlabandSimulink

 

Title:

AutomobileVelocityControl

Name:

巫宇智

StudentID:

U

Class:

电气0811

 

Catalogue

Preface3

TheDesignIntroduction4

RelativeKnowledge5

DesignandAnalyze6

CompareandConclusion19

Afterdesign20

Appendix22

Reference22

 

1.Preface:

Withthehighpaceofhumancivilizationdevelopment,thecarhasbeenacommontoolsforpeople.However,someproblemsalsoariseinsuchtendency.Amongmanyproblems,thevelocitycontrolseemstoasignificantchallenge.

Inaautomatedhighwaysystem,usingthevelocitycontrolsystemtomaintainthespeedofthecarcaneffectivelyreducethepotentialdangerofdrivingacarandalsowillbringmuchconveniencetodrivers.

Thisarticleaimsatthediscussionaboutvelocitycontrolsystemandthecompensatortoamelioratethepreferenceoftheplant,thusmeetsthecomplicateddemandsfrompeople.ThediscussionisbasedonthesimulationofMATLAB.

 

Keyword:

PIcontroller,rootlocus

2.TheDesignIntroduction:

Figure2-1automatedhighwaysystem

Thefigureshowsanautomatedhighwaysystem,andaccordingtocomputingandsimulation,avelocitycontrolsystemformaintainingthevelocityifthetwoautomobilesisdevelopedasbelow.

Figure2-2velocitycontrolsystem

Theinput,R(s),isthedesiredrelativevelocitybetweenthetwovehicles.Ourdesigngoalistodevelopacontrollerthatcanmaintainthevehiclesinseveralspecificationbelow.

DS1Zerosteady-stateerrortoastepinput

DS2Steady-stateerrorduetoarampinputoflessthan25%oftheinputmagnitude.

DS3Percentovershootlessthan5%toastepinput.

DS4Settlingtimelessthan1.5secondstoastepinput(usinga2%criteriontoestablishsettlingtime)

3.RelativeKnowledge:

Controllerhereactuallyservesasacompensator,andwehavesomecompensatorsfordifferentspecificationandsystem.

Table3-1Compensators

compensator

Appilicablecondition

Adjuststeadyerror

Addthetypeofsystem,thusadjustthesteadyerror

PIcontroller:

adjuststeadyerrorandaddanzero

Increasethephasemargin

Increasethephasemargin,keepthesteadyerrorunchanged

PIDcontroller:

balanceallthepreference(steadypreference,aswellasdynamicpreference)

4.DesignandAnalysis:

4.1Specificationanalysis

Accordingtotherelativeknowledgeabove,ImayconsideraPI

controllertocompensate------------

.

Ds1:

zerosteadyerrortostepresponse:

Tointroduceanintegralparttoaddthesystemtypeisenough.

Ds2:

Steady-stateerrorduetoarampinputoflessthan25%ofthe

inputmagnitude.

Ds3:

overshootlessthan5%toastepresponse.

DS4Settlingtimelessthan1.5secondstoastepinput(usinga2%criteriontoestablishsettlingtime)

AccordingtoDS3andDS4,wecandrawthedesiredregion

toplace

ourclose-looppoles.(astheshadowindicate)

Figure4-1Desiredregionforlocatingthedominantpoles

 

Afteraddingthecontroller,thesystemtransferfunctionbecome:

ThecorrespondingRoutharrayis:

1Kp+ab

a+bKi

0

Ki

Forstability,wehave

Foranotherconsideration,weneedtoputthebreakpointof

rootlocustotheshadowareainFigure4-1toensurethedominant

polesplacedontheleftofs=-2.66line.

Inall,thespecificationisequaltoaPIcontrollerwithlimitbelow.

4.2Designprocess:

4.2.1Controllerverification:

Attheverybeginning,wetakethesystemwithG(s)=

andthecontroller(providedbythebook)with

foraninitialdiscussion.

Figure4-2stepresponse(a=2,b=8,Kp=33,Ki=66)

Figure4-3rampresponse(a=2,b=8,Kp=33,Ki=66)

Fromfigure4-2,wecanseethattheovershootis4.75%,andthesettlingtimeis1.04swithzeroerrortothestepinput.

Fromfigure4-3,itisclearthattherampsteady-stateerrorisalittlelessthan25%.

Thus,thecontrollerwith

completelymeetsthespecification.

4.2.2furtheranalysis:

Fornextprocedure,Iwillhavesomemorespecificdiscussionabouttheapplicablerangeofthiscontrollertoseehowmuchcanaandbvaryyetallowthesystemtoremainstable.

Wedon’tchangetheparameterofthecontroller,andinserttheKi=66,Kp=33intotheinequalityandgetthis:

.

Ifwesupposethesystemtobeaminimumphasesystem,a,b>0,thusitiseasytoverifythe3rdinequality.Now,wedrawtoseetherangeofaandb.

Figure4-4therangeofa,bforcontroller(Kp=33,Ki=66)

Actually,theshadeareacannotcompletelymeetsthespecification,fortheconstraintconditionsrepresentedinthe3inequalityisnotenough,weneedtodrawtherootlocusforacertainsystem(aandb)tolocatetheactuallimitforcontroller.

However,thistaskisratherdifficult,inaway,the4variables(a,b,Ki,Kp)allvaryintermsofothers’change.Thuswecanapproximatelylocatetherangeofaandbfromthefigureabove.

4.2.3Alternativesdiscussion:

Accordingtoinequality

Therangeofaandbbearsomerelationwiththeinequalitybelow:

Basingourassumptionontherangeinthepreviousdiscussion,wecaneasilyseethatinordertoincreasetherange,wecanincreaseKianddecreasetheratioofKitoKp.

Thus,Iadjusttheparameterto

Figure4-5therangeofa,bforcontroller(Kp=64,Ki=80)

Asthefigureindicate,(therangebetweendottedlinesreferstothepreviouscontroller,whiletherangebetweenredlinesreferstothenewalternatives),therangeincreaseasweexpect.

Nextstep,wemaykeepthesystemofG(s)=

fixed,anddiscussthedifferentcompensatingeffectofdifferentPIparameter.

Whencarefullycheckingthecontroller,wemayfindthatthecontrolleractuallyaddazero(-Ki/Kp),anintegralpartandagainpart,sowecanonlychangethezeroanddrawthelocusrootandexaminethestepresponseandrampresponse.

:

Figure4-6therootlocus(

Usingrlocfind,wefindthemaximumKp=34.8740

Sowechoose3groupsofparameter([35,52.5],[30.45],[25,37.5])toexaminethereponse

Figure4-7thestepresponse(

It’sclearthatthestepresponsepreferenceisnotsatisfyingwithtoolongsettlingtime

 

:

Figure4-8therootlocus(

Usingrlocfind,wefindthemaximumKp=34.3673

Sowechoose3groupsofparametertoexaminetheresponseandrampresponse.

Figure4-9thestepresponse(

Figure4-10therampresponse(

:

Figure4-11therootlocus(

Usingrlocfind,wefindthemaximumKp=31.47

Similarly,wechoose3groupsofparametertoexaminetheresponseandrampresponse.

 

Figure4-12thestepresponse(

Virtually,theovershoot(Kp=30,Ki=75)doesn’tmeetthespecificationasweexpect.Iguess,thatmaycomefromtheeffectofzero(-2.5),thus,gobacktothestepresponseof

duetotheeliminationbetweenzero(-2)andpoles,thusthepreferenceiswithinourexpectation.

Figure4-13therampresponse(

5.CompareandConclusion

Mainlyfromthestepresponseandrampresponse,itcanbeconcludedthat,inacertainratioofKitoKp,thelargerKpbringssmallerrampresponseerror,aswellaslargerrangeofapplicablesystem.Nevertheless,thelargerKpmeansworsestepresponsepreference(includingovershootandsettlingtime).Thiscontradictionisrathercommonincontrolsystem.

Inall,togetthemostsatisfyingpreference,weneedtobalancealltheparametertomakeacompromise,butnotasingleparameter.

Fromwhatwearetalkingabout,wefindthecontrollerprovidedbythebook(Kp=33,Ki=66)maybeoneofthebestcontrollerincomparisontosomedegree,withsatisfyingstepresponseandrampresponsepreference,aswellasawiderrangeforthevariationofaandb,further,ituseazero(s=-2)totransferthe3rdordersystemto2ndordersystem,indoingso,wemayeliminatesomeunexpectedinfluencefromthezero.

Thecontrollerverifiedabove(inFigure4-9andFigure4-10)withKp=34,Kp=68maybealittlebetter,butonlyalittle,anditdoesn’tleavesomemargin.

 

6.AfterDesign

这是一次艰难,且漫长的大作业,连续一个星期,每天忙到晚上3点,总算完成了这个设计,至少我自己是很满意的。

其实与其说是大作业,不如说就是一次课程设计。

运用所学的自控知识,加上matlab操作知识,去探究了一下用根轨迹法去研究校正的问题。

这次选题很多,有超前滞后校正,有状态反馈校正,但这两种在前不久的自控实验中都已经做过,所以这一次挑战一下自己,选择这个根轨迹法来做。

一开始觉得这个选题并不难,而且书上也要代码等,但真正做起来,发现很有点棘手。

由于题目中要求研究某种控制器对某些系统的校正能力,相当于PI控制器中的Kp,Ki和系统中的两个极点全是变化的。

一段时间琢磨和不断仿真试验后,我决定换个角度去思考,分别控制系统不变和控制器不变,去研究控制器的控制范围,以及各种控制器对一个特定系统的矫正效果,最后在通过比较分析论证。

题目要求找到一个适用范围更广的控制器,但经过我不断摸索,证明出课后题中所给控制器已经是最优解了,再优的也只是提高一点点的极限值,虽然我没有找到更优解了,但这个过程中我充分了解到设计和探究的步骤,不管结果是否正确,我在这个探究过程中收获颇多。

7.

holdoff

clg

n=[1];d=[11016];

tau=2.5;

nc=[1tau];dc=[10];

[num,den]=series(n,d,nc,dc);

rlocus(num,den)

holdon

plot([-2.66-2.66],[-2020]);

z=0.69;

plot([0-20*z],[020*sqrt(1-z^2)],[0-20*z],[0-20*sqrt(1-z^2)])

grid

rlocfind(num,den)

%drawtherootlocus%

Appendix:

holdon

a=[0:

0.01:

20];

b=6.57-a;

c=[0:

0.10:

20]

d=20./c

plot(a,b,c,d)

%plottheinequality%

n=[1];d=[11016];

Kp=30;Ki=75;

nc=[KpKi];dc=[10];

[numa,dena]=series(n,d,nc,dc);

g=tf(numa,dena)

f=feedback(g,1);

h=f*tf([1],[1,0]);

step(h),grid

holdon;

t=[0:

0.01:

100];

plot(t,t,'r-');

%rampresponse%

holdon

n=[1];d=[11016];

Kp=30;Ki=75;

nc=[KpKi];dc=[10];

[numa,dena]=series(n,d,nc,dc);

[na,da]=cloop(numa,dena);

step(na,da),grid

%stepresponse%

8.Reference:

1)RobertH.Bishop,ModernControlSystemAnalysisAndDesignUsingMATLABAndSimulink,Beijing:

TsinghuaUniversityPress,2003,12

2)胡寿松,《自动控制原理》(第五版),北京:

科学出版社,2007,6

3)胡寿松,《自动控制原理简明教程》(第四版简明版),北京:

科学出版社,2003,4

4)张德丰,《MatlabSimulink建模与仿真》,北京,电子工业出版社,2009,3

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

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1