15
Control Systems Design Topic Preliminary Notes The Control Design topic in this subject is spread over 3 weeks, with laboratories in Weeks 8, 9 and 10. The topic consists of 6 design tasks. You will find that it is important to work through at least the initial tasks in sequence. Tasks may be assessed individually, or multiple tasks may be assessed together, but you should not expect to be able to get more than 3 tasks assessed in any given lab session. Your performance in the design tasks will be assessed in the laboratory. As indicated in the course overview, this assessment is worth 20% of the marks for this course, but you will be marked out of 100, with 60 of the 100 marks awarded on the basis of design outcomes and 40 of the 100 marks awarded on the basis of understanding. An individual breakdown of the maximum marks available for each task is provided later in this document. Note, however, that sum of all available marks actually exceeds 100. Your final mark in this topic will be capped at 100. Some analog circuitry is required for the Control Design topic, in particular for controlling the fan in the control rig and for sensing the position of the floater. Other aspects of the topic, however, involve use of the computer, for which you may use either the Lab computers or your own laptop – you might need to use an external peripheral to ensure that line-in and line-out functionality are available on your own laptop. You should bring to the laboratory: 1) a sufficiently large breadboard; 2) a bound laboratory notebook; 3) a small screw-driver for adjusting trimpots; and 4) a USB thumb drive that can be used to transfer files to/from the laboratory computers. The Control Rig All of the Control design tasks are based on a custom control rig that allows a computer cooling fan to be driven in such a way as to raise or lower a “floater” within a slotted PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided on the course web-site. Specifications for the computer cooling fan that powers the rig may be found on the course web-site. The following rules apply to your use of the control rig: 1. Marking, modifying or defacing any part of the rig is strictly forbidden. To mark positions along the PVC pipe you must use the masking tape provided in the laboratory. 2. You must avoid exceeding the rated motor supply voltage of 12V DC. 3. You must not obstruct any part of the slot in the PVC pipe, e.g., with masking, unless authorized to do so by a Lab demonstrator. There is some inevitable variability between control rigs, so it might in some cases be necessary for masking tape to be applied to the lower part of the slot to allow the floater to move up; however, this is ELEC4123, S1, 2018 Topic T3: Control Systems – last updated 2 May, 2018 created by Prof. D. Taubman

ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Control Systems Design Topic Preliminary Notes The Control Design topic in this subject is spread over 3weeks,with laboratories inWeeks8,9and10.Thetopicconsistsof6designtasks.Youwillfindthatitisimportantto work through at least the initial tasks in sequence. Tasks may be assessedindividually,ormultipletasksmaybeassessedtogether,butyoushouldnotexpecttobeabletogetmorethan3tasksassessedinanygivenlabsession.Yourperformanceinthedesigntaskswillbeassessedinthelaboratory.Asindicatedinthecourseoverview,thisassessmentisworth20%ofthemarksforthiscourse,butyouwill bemarkedoutof100,with60of the100marks awardedon thebasis ofdesignoutcomes and 40 of the 100 marks awarded on the basis of understanding. Anindividualbreakdownofthemaximummarksavailableforeachtaskisprovidedlaterinthis document. Note, however, that sum of all available marks actually exceeds 100.Yourfinalmarkinthistopicwillbecappedat100.Some analog circuitry is required for the Control Design topic, in particular forcontrolling the fan in thecontrol rigand for sensing thepositionof the floater.Otheraspects of the topic, however, involve use of the computer, forwhich youmay useeithertheLabcomputersoryourownlaptop–youmightneedtouseanexternalperipheraltoensurethatline-inandline-outfunctionalityareavailableonyourownlaptop.You should bring to the laboratory: 1) a sufficiently large breadboard; 2) a boundlaboratory notebook; 3) a small screw-driver for adjusting trimpots; and 4) aUSBthumbdrivethatcanbeusedtotransferfilesto/fromthelaboratorycomputers.

The Control Rig AlloftheControldesigntasksarebasedonacustomcontrolrigthatallowsacomputercooling fantobedriven insuchawayas toraiseor lowera“floater”withinaslottedPVCpipe.TheapparatusisillustratedroughlyFigure1,butadditionalillustrationsandphotosmaybeprovidedonthecourseweb-site.Specificationsforthecomputercoolingfanthatpowerstherigmaybefoundonthecourseweb-site.Thefollowingrulesapplytoyouruseofthecontrolrig:

1. Marking, modifying or defacing any part of the rig is strictly forbidden. To mark positions along the PVC pipe you must use the masking tape provided in the laboratory.

2. You must avoid exceeding the rated motor supply voltage of 12V DC. 3. You must not obstruct any part of the slot in the PVC pipe, e.g., with masking, unless

authorized to do so by a Lab demonstrator. There is some inevitable variability between control rigs, so it might in some cases be necessary for masking tape to be applied to the lower part of the slot to allow the floater to move up; however, this is

ELEC4123, S1, 2018 Topic T3: Control Systems – last updated 2 May, 2018

created by Prof. D. Taubman

Page 2: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

not for you to do yourself. A demonstrator must first check that the problem is not related to your fan driving circuit.

4. You must keep the control rig away from the bench edge to avoid risk of dropping it. 5. You may not take the control rig out of the laboratory, but each rig has an ID that will

be assigned to you so that you use the same rig in each wee\k..

Figure1:ControlRig

Otherelementsthateithercanormustbeusedaspartofthecontrolrigareasfollows:1. Machined plastic “floater” with tapered shaft – do not lose this! 2. Infrared LED (QEE113) – see datasheet on course web-site. 3. Infrared Photo-transistor (QSE113) – see datasheet on course web-site 4. Masking tape (available in the lab) – you can use this to affix the optical elements

above, but other methods such as Blu-Tack might also be made available.

Policies to Help Prevent Cheating Unlikeprevioustopics,youwillbeallowedtobringapopulatedbreadboardintoallbut the first laboratory. However, in Week 8 your breadboard must beunpopulatedonentrytothelab–demonstratorswillinsistuponthis.Demonstratorswillattachstickerstothebackofyourbreadboardastheyassesseachrelevanttask,sothatyourassessmenthistoryaccumulatesoverthelifetimeofthetopicin aphysicalway thatmustmatch theelectronic recordof your assignedmarks. It isyourresponsibilitytoensurethatthestickersremainintactoverthetopic.Youmusthaveaboundlaboratorynotebook(notlooseleavesofpaper)presentwithyou in any laboratory sessionwhere you expect to be assessed. Yourdesignmust bedocumented in this notebook in your own handwriting, including schematics andalgorithmic principles, considered alternatives and design calculations. Whenexplaining your design to a demonstrator during assessment, you must use these

Page 3: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

handwritten notes. You may not use printed materials or digital notes for thispurposeasthedocumentaryevidenceforyourdesign.Softwarethatyouwriteaspartofthistopicmustbeclearandwellcommentedsothatanassessorcan followthereasoningandmatch itagainst theexplanation inyour labnotebook. Of course, it is strictly forbidden tocopyanyotherstudent’swork,even ifyouhaveexchangedideaswithotherstudentsduringthelead-uptoalaboratory.

Electronic Components Tominimizetimewastage,andaspartofthedesignchallenge,youareonlyallowedtouseasmallsetofdefinedelectroniccomponentsinyourdesigns.Thesecomponentsaremadeavailablefreeofchargeinthelaboratory,butdemonstratorswilllimitthenumberofcomponentstheydistributetoanygivenstudenttoavoidunnecessarywasteandtoensurethatallstudentshaveaccesstocomponentstheywillneed.Youshouldtakethecomponentsthatyouhavecollectedfromalabdemonstratorhomewith you after the lab session and bring them back the following week, for yourcontinued work. Often, components can and should be re-used across tasks andevenwholetopics,sodonotdiscardanyofthecomponentsthatyoureceiveinthisoranearliertopic.

Sharing Equipment and Communication in the Lab Due to current resource constraints, you will generally share a work bench in thelaboratorywithalabpartner.Despitethis,yourdesign,implementationandassessmentfor these tasks are all individual. Naturally, you cannot expect to have your designpermanently tethered to the power supply, oscilloscope, signal generator or PC. Youshould, therefore, communicate with your lab partner and establish a good workingrelationshipforsharingtheequipment.Youmayfinditusefultobringyourownlaptoptothelaboratory.Ifyouchoosetouseyour own laptop’s sound card, it is entirely possible for you to avoid any resourceconflictswithyourlabpartnerinthistopic.Thisisbecauseeachstudentwillhavetheirowncontrolrig,anditislikelytobepossibleforyouandyourpartnertobothusethesame bench power supply concurrently, assuming that you have no unusualrequirements.If,however,youchoosetousetheNI-DAQdeviceforsignalacquisitionandoutput,youshould be aware that there is only one such device per post, and you cannot take ithometoexperimentwith.Also,followinganexcellentsuggestionmadeinthelecture,allinputstoandoutputsfromtheNI-DAQmustbeAC-coupledinthisdesigntopic.Althoughassessment is individual, youcancommunicate freelywithyour labpartnerregarding the design problem. There is no expectation that your partner should helpyouwiththeconstructionorpreliminarytestingofyourdesign,butthisispermittedsolong as you both agree. However, it isunacceptable for anybody other than you,your lab partner and course staff to be interacting significantly during thelaboratory session, and it is totallyunacceptable foranyotherperson to come toyourlabbenchwithoutthepermissionofalabdemonstrator.Laboratorydemonstratorshavefullauthoritytoenforcetheabovepolicybymovingtheoffending parties to the end of theirmarking list or (after awarning) by suspendingthemfromanyformofassessmentduringtheweekinwhichtheoffenceoccurs.

Page 4: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Assessment Procedure Demonstratorswillmaintainanorderedassessmentlist. Youmaynotaddyournametothe listuntilyouhaveasolutionyouarepreparedtohaveassessed. Studentswhohave already been assessed for a task may have the opportunity to be re-assessed,during the same or a later laboratory session, but students who have not yet beenassessedwillbegivenpriorityoverthoseseekingre-assessment.Demonstratorsmayaskyoutomovetoaseparateareaforassessment,sothatyourlabpartner need not be disturbed. With this in mind, you should ensure that yourimplementationisasportableaspossible,sothatyoucaneasilyconnectittoaseparatepowersupply,signalgenerator,oscilloscopeand/or labcomputer,asappropriate.Fortasksinvolvingdigitalprocessing,youwillbeallowedtouseyourownlaptopcomputeraspartoftheassessmentprocess.Youmusthaveyour labnotebookwithyoutobeassessed,andforeachtaskyour labnotebook must contain a “final” hand drawn schematic and/or algorithmdescriptionthatcorrespondstothedesignyouarebringingforassessment.For tasks that involve digital processing, a handwritten description of the finalalgorithm is particularly important,whichmaybepresented as a flow chart or blockdiagramwithsufficientdetail,alongwithadescriptionofkeyparametersandvariablesandthemostrelevantequations.Unlessotherwisestated,youcannotreceiveunderstandingmarksforadesignthatyouhavenotimplemented.

Page 5: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Task 1: PWM Control of Fan Speed Inthisdesigntask,youaretodesignandbuildacircuitforcontrollingthemotor.Themotor isdesignedtobecontrolledusingpulsewidthmodulation(PWM). Specifically,12VDCshouldbeapplied to theRED(VCC=+12V)andBLACK(GND)wires,whileaPWMcontrol signal isappliedbetween theYELLOW(PWM)andBLACK(GND)wires.Internally,aMOSFETtransistorcontrolsthepowertothemotor(ON/OFF),controlledviathePWMsignal.YoucandrivethePWMsignalatTTLvoltagelevels(0.8Vorbelowmeansoff,while3Vorabovemeanson),butyoucandrivetheinputatvoltagesashighasVCC=12Vifyoulike.To control the motor, you should design and build a PWM control circuit with thefollowingattributes:

1. Preferred operating frequency is up to 20kHz; lower frequencies may createaudibleswitchingnoise.

2. Pulsewidthcanbeadjustedviaasmalltrimpot–10kWisrecommendedduetohighavailability in the labs. Youare recommended to solderhookwire to theterminals of the trimpot to simplify the connection and adjustment of thetrimpot.

3. PulsewidthcanbeadditionallymodifiedviaMatlab,using theoutput fromthesoundcardofthelabcomputersorusingtheNI-6809MultifunctionDAQ.

Joint (additive) control via the trimpot and Matlab will prove very important to theControl Systems topic as a whole. You should think carefully about the computercontrol aspect, taking into account the fact that the sound card is AC coupled. Thismeans that computer control of the fan motor via the sound card will need to beachievedviathefrequencyoramplitudeofanoscillatorywaveform.It ispossibletousetheNI-6809MultifunctionDAQUSBdevicethat isavailable inthelabs insteadof the soundcard. However,wedonothaveenough supplyof these foreachstudenttohavetheirown.Toavoidexcessivesimplificationfromarisingwiththeuse of the NI-DAQ device, you are required to capacitively couple all NI-DAQ signalsused in yourdesign.That is,youneedtoexplicitly includecapacitors in thepathcouplingyourdesigntotheNI-DAQ.Beforeembarkingonthistask,hereareafewusefultips:

1. It ishighlydesirablethatyourdesignisabletoachieve100%drive(ONallthetime),inordertoallowmaximumpowertobedeliveredtothefan.

2. Youcanexploretherangeofaveragevoltagesthatareinterestingwhendrivingthefan,byinitiallyhookingupthepowersupplytothefan,tyingthePWMsignaltoavalueof3Vormore,andadjustingthepowersupplyoutputvoltagedirectly.Setthefantofullpower(12V)andbesurethatthecurrentcontrolonthepowersupplyissethighenoughthatitdoesnotthrottlethemotoratall.Dropafloaterinto the PVC pipe and check that it floats at a good position. Now drop thevoltagedownslowly to find the lowestvalueyouare likely tobe interested in.Makesurealsothatthefancanstartatthelowervoltage,bydisconnectingthepowersupplyandthenreconnectingittostartthemotorfromthestalledstate.

3. Your design will need to be controllable in two ways (at the same time): a)manualadjustmentviaa trimpot;andb)dynamiccontrolvia thesoundcardorNI-DAQ. The two control mechanisms should be additive and allow the fullrange of interesting fan speeds to be achieved. In particular, it should be

Page 6: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

possible,withoutattachingthecomputer,toachievethefullrangeoffanspeedsbymanualadjustmentofthetrimpot.

Operatingconditions:1. Appliedmotorvoltage12V2. PowersupplyforPWMdrive:±12V,double-ended,ifrequiredNote:Althoughyoumightneedadouble-endedpowersupply,allstudents’designsshouldoperateat12V,allowingyoutosharethepowersupplywithalabpartnerifnecessary,usingtwosetsofleads.

Requirements/specifications:1. Mustbeabletodemonstratecontroloffanspeedviathecomputer,usingMatlab.2. Must be able to adjust the fan speed via the trimpot, with or without the

computerinputpresent.3. Mustbeableto“floatthefloater”pasttheholesusedforopticalsensing.

Softobjectives:1. Abilitytoreachadutycycleof100%(fullyon),orextremelyclosetothis.2. ItisdesirabletominimizetheresponsetimeofyourPWMcircuittochangesin

thedrivesignalfromthecomputer.Note:bothofthesesoftobjectivesmaybeassesseddirectlyfromyourdesign,ratherthan by testing, so be careful to document how they are addressed in your labnotebook.

Components available for this task: Diodes:1n4148Transistors:BC549,BC559

AnalogIC’s:LM324,LM348,LM741,LM555Trimpot:10kResistorsandcapacitors,asfoundinthelaboratories

Assessment for this task: Marksforthistaskareasfollows:

• Controlofthefanspeedviatrimpot:(____/5)• ControlofthefanspeedviaMatlabwithtrimpotadjustment:(____/6)• Softobjectives:(___/3)• Understanding:(____/8)

Assessment timing and requirements: YoumaycompletethistaskinanyofWeeks8,9or10.Pleasenotethegeneralinstructionsaboveconcerningtherequirementthatyoupresentyourlabnotebook,witha“final”handdrawnschematicofthedesignyouarebringingfor assessment, alongwithwritten documentation of source code used to computer-basedcontrol.

Page 7: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Task 2: Sensing of Floater Position This design task is concerned with the second major aspect of any control system:sensing. Tominimize the effort required for this task, wewill bemaking available amachined plastic floater, in the shape of a dumbellwith tapered shaft. The plastic istranslucent, so the tapered shaft attenuates transmitted light in aposition-dependentmanner. An Infrared LED and amatching photo-transistor are provided to sense theamountoflightthatpassesthroughthefloaterasittraversesapathbetweentwoholesdrilledintothesidesoftheslottedPVCpipe.ByWeek9,therewillbeaseparatefloateravailable for every student, but in Week 8 it might be necessary to share a limitednumberoffloaters.It is your responsibility to attach the provided LED and photo-transistor to the PVCpipe,usingmasking tapeorperhapsBlu-Tack,asprovided in the laboratory,and it isimperativethatyouavoiddamagingthesedevicessobesuretoreadthedatasheetsthatareavailablefromthecourseweb-site.Whilethedescriptionhereisspecifictothetaperedplasticfloaterandopticalsensing,youarealsopermittedtouseaferritefloaterthathassimilarmassandalsofloatswellwithinthePVCtube,withaninductivesensingsystem.Inductancewindingwireandtheferritefloatersareavailableonrequest,fromyourlabdemonstratorortheElectronicsWorkshop in EE-G15. You are not to use the hookup wire in the laboratories forwindinginductivecoils,sincethiswouldconstituteaconsiderablewasteofresources.Ifyoudouseaninductivesensingsystem,youmustbecarefultoensurethatthefloaterposition is evident by visual inspection through the slot in thePVCpipe,when it lieswithinthesensitiverangeofyoursensingapparatus.YoursensingsystemneedstoresultinadigitalvaluethatcanberegularlyreportedviaaMatlabprogramthatyouwrite.Thereportedvaluesfromyoursensorsystemdonotneed to be linearly related to position – that is the subject Task 3. In general, anyquantitythatismonotonicallyrelatedtothefloaterposition,overtherangeofpositionswherethismakessense,issufficient.Forsendingsignalstothesoundcardofthecomputer,youshouldusethesameinputprotectioncircuitthatyouconstructedfortheSignalProcessingdesigntopic,consistingof4diodesandaresistor.Ifyouareunsureofthis,askthedemonstratortocheckyourwork.Asmentionedearlier,theNI-DAQisalsoavailableasanoption.Unlikethesoundcard,theNI-DAQcanbeusedtosenseDCvoltagelevels,butinthistopicyouarerequiredtoACcoupleallNI-DAQinputandoutputsignals,byexplicitly includingcapacitorsinyourdesign.Totestanddemonstrateyoursolution,youwillneedtobeabletocontrolthepositionofthefloaterwithinthePVCpipe.Theonlyeasywaytodothisisbycontrollingthefanmotorspeed,usingyoursolutiontoTask1–trimpot-basedcontrolissufficienthere.Operatingconditions:

1. Appliedmotorvoltage12V2. PowersupplyforPWMdrive:±12V,double-ended,ifrequired3. Youmaynotusethesignalgeneratorasanypartofyourdesign4. Youmayuseatmostoneanaloginputchannelandoneanalogoutputchannelof

thecomputersoundcardortheNI-DAQdevice(ACcouplingrequired).

Page 8: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Requirements/specifications:1. Adigitalvaluefromthesensingsystem,mustbeacquiredandprintedinMatlab

atleastevery250ms–i.e.,printoutatleast4linespersecond,continuously.2. Theprinteddigitalvaluemustvarymonotonicallywith floaterposition,overa

rangeofpositionsthatcoversatleast25mm.Softobjectives:

1. Itisdesirabletominimizethedelayinyoursensingsystem2. Itisalsodesirabletominimizenoise,interferenceanduncertaintyinyoursensor

outputvaluesNote:averagingor(moregenerally)low-passfilteringmaybeusedtoreducenoise,attheexpenseofincreaseddelay.Sothesoftobjectiveherecapturestheneedtofindagoodtrade-offbetweenthesetwogoals.Thesoftobjectivescannoteasilybetestedexperimentally,butyouneed tobeprepared toprovidea clearexplanationof themeasures taken to minimize sources of interference and uncertainty for a givendelay–theexplanationneedstobeinyourlabnotebook,ofcourse.

Components available for this task: Diodes:1n4148Transistors:BC549,BC559

AnalogIC’s:LM324,LM348,LM741,LM555LED:QEE113Photo-transistor:QSE113Resistorsandcapacitors,asfoundinthelaboratories

Assessment for this task: Marksforthistaskareasfollows:

• Hardrequirements:(____/8)• Softobjectives:(____/3)• Understanding:(____/8)

Assessment timing and requirements: YoumaycompletethistaskinanyofWeeks8,9or10.Pleasenotethegeneralinstructionsaboveconcerningtherequirementthatyoupresentyourlabnotebook,witha“final”handdrawnschematicofthedesignyouarebringingforassessment,alongwithwrittendocumentationofalgorithmsandsourcecode.

Page 9: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Task 3: Sensor Characterization ThepurposeofthisdesigntaskistocharacterizethesensingsystemthatyoudesignedandconstructedinTask2.Thisispartofthethirdphaseofanycontrolsystemdesign,knownasSystemIdentification.InTask4,youwillcompletethesystemidentificationphasebycharacterizingthemotor-fan-floateractuationsystem,butthisdependsontheexistenceofaproperlycharacterizedsensingsystem.To complete this task youwill need tohavemet the requirements forTask2,with asensingsystemthatissensitivetofloaterpositionsrangingoveratleast25mm.Using annotatedmasking tape,mark off positions overwhich your sensing system issensitivetothefloaterlocation,inmultiplesof4mmorless.Allmeasurementsshouldbeexpressedinabsoluteterms,asthedistancebetweenthetopedgeofoneoftheholesinthePVCpipeandthetopedgeofthefloater.Onlypositivevaluesareofanyinterest,buttheimportant25mmofthisrangeneednotnecessarilystartfrom0mm.Do notwrite on the PVC pipe itself or cover the slotwithmasking tape! Adjust thefloater within the PVC pipe using the trimpot method of Task 1, moving it slowlythrougharangeofpositionsandcollectingthesensormeasurementsinMatlab.Dothismultiple times, collecting the data and saving it to your USB stick. You need to bepreparedtorepeatasmallpartofthismeasurementprocessinthepresenceofyourlabdemonstrator.Forunderstandingmarks,youneedtobepreparedtopresentascatterplotof themeasuredrelationshipbetweenpositionandsensormeasurement,sokeepthishandy.Beyond just measurement, in this task you need to derive a mapping from sensormeasurementsbacktoposition(reverseofthemeasurementprocess).Youarestronglyencouraged to consider whether it is possible to fit a sensible model to themeasurements you obtain, so that the mapping from sensor measurements to thepositioninvolvesonlyafewmodelparameters,whichmightbeobtained,forexample,throughregression.Themodelcanbesimple,butshouldideallybephysicallyinspired,asisthecaseinmostcontrolengineeringwork.Finally,youaretoestimatethestandarddeviationoftheestimatedposition.Fromyouroriginalmeasurementdata the standarddeviationof sensor readingsasa functionofpositioniseasilyobtained,buttheinferredresultofinterestisthestandarddeviationinpositionasafunctionofposition,andthisshouldideallyincludeexpectedmodelfittingerrorsifyouhaveusedamodelforthemappingfunction.Puttingallthisinformationtogether,yourfinalsolutiontoTask3willbeaprogramthatreportsthefloaterpositioninmm,alongwithanexpectedstandarddeviation,atleast4timesper second, similar toTask2, except that the reported values are expressed inmm.Note that this task imposes requirements on the sensing system itself. If yourmeasurementsarenotconsistentwithareliableandrepeatablesensingsystemforthepositionofthefloater,overatleast25mm,youwillneedtogobackandimproveyoursensing system. This might happen, for example, if your sensing system is heavilyinfluencedbyambientlightingconditions.Operatingconditions:

• Sameasprevioustasks

Page 10: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Requirements/specifications:1. Same as for Task 2 but you are required to report “credible” floater position,

expressedinmmfromthetopofthePVCholetothetopofthefloater,atleast4timespersecond,witheachreportedpositionprintedonaseparateline.

2. You are also required to report an estimated standard deviation for yourpositionvalues,alongwiththepositionitself.

Softobjectives:1. Itisdesirabletominimizetheroot-mean-squareerrorbetweentheactualfloater

position(distancefromtopofholeinPVCpipetotopoffloater)andthereportedvalue.

2. It isalsodesirablethatthereportedstandarddeviationsareclosetotheactualRMSerror.

Note:Tosomeextentthesethingscanbetested,moreeasilyatleastthaninTask2.Byreturningthefloatertoagivenpositionmultipletimes,an ideaof theerrors inyourreportedpositionscanbeobtainedandcomparedwithyourreportedstandarddeviation.Fromanotherpointofview,thesourcesoferrorhereincludebotherrorsin the original measurement system and errors in the mapping process. Thedemonstratorneedstobeabletoascertainthatyouhaveusedasuitableprocessforperformingthemapping.

Assessment for this task: Marksforthistaskareasfollows:

• Hardrequirements:(____/7)• Softrequirements:(____/2)• Understandingandclearpresentationanddocumentationofresults:(____/6)

Weeks in which this task may be completed: YoumaycompletethistaskinanyofWeeks8,9or10.Pleasenotethegeneralinstructionsaboveconcerningtherequirementthatyoupresentyourlabnotebook,withwrittendocumentationofalgorithmsused.

Page 11: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Task 4: System Identification Thepurposeof this design task is to characterize control rig itself. Inparticular, thegoal istocharacterisethesystemthatdeliversacontrolsignal inMatlabtothesoundcard (orpossibly theNI-6009USBDAQdevice), influencing the fan speedand floaterposition, andultimately results inameasuredpositionof the floater, again inMatlab.That is,youareseekingtomodel thetransfer functionfromthedigitaldrivesignal tothedigitalsensedposition.Youcanexpectthistransferfunctiontoincludea(hopefully)fixed delay component that results from the latency in your drive andmeasurementsystems, including delays associated with buffering in the sound card or NI-DAQdrivers.Apartfromthis“fixed”delay,thesysteminvolvesthephysicalstructureofthecontrolrig,thefanandmotor,andthePWMdriverthatyoudevelopedforTask1.LikeTask3,thistaskdoesnotinvolvedesignofanyphysicalsub-system,butitrepresentsakeystepinthedesignofacontrolsystem.Toperformthecharacterisation,youneedtoobservethedynamicsofthesystemasastepchangeisappliedtothefanmotor.Specifically,youneedtoadjustthePWMdrivesystem first so that the floater is sitting within the sensitive region of your sensingsystem (Task 2). You might find it convenient to make this adjustment using thetrimpot rather thanbyadjusting the signaldeliveredby the computer. Youwill thenarrangeforastepchangeinthemotordrivesignaltobedeliveredfromthecomputerandobservethebehaviourofthefloaterbyrecordingthesensedposition(Task3).Bybothcontrollingthemotorandmeasuringtheresponsein,youwillbeabletoidentifyend-to-enddelaysthatformpartofthecompletesystem,aswellasotheraspectsofthetransferfunction.You will need to think about how you can continuously issue motor voltage controlsignals while continuously sampling the position input data used to derive positioninformation.AnexampleofhowthiscanbedoneinMatlabwillbepostedtothecourseweb-site.You should use the sensor characteristic that was measured for Task 3 to convertoriginal sensordata (Task2) to floaterposition (inmm). Of course, you should takecarenottoadjustthestimulussothatthefloaterisdrivenbeyondthesensitiveregionofyourpositionsensingsystem.Keysystempropertiestoberecoveredinthistaskareasfollows:

1. Gain, measured at steady state, representing the ratio between the ultimatechange inposition (mm)and change in thedrive signal (adigital signal). Thegainmight not be constant over the sensitive range, so you should attempt tocharacterize any such non-linearity, as was done in Task 3 for the positionsensormeasurements.

2. End-to-end delay, measured in milliseconds, between the point at which thestimulusisemittedandthepointatwhichanyresponsecanbedetected.

3. Velocity, inmm/s, as a functionof timeelapsed since the step change indrivesignal. Thevelocityprofilewillhelpyou tounderstandwhat isgoingon. Youshouldhavean ideaofwhatyouexpect tohappenandbeprepared toexplainthisduringassessment.

Toobtainreliableresults,youshouldaveragetheoutcomesfrommultipleexperiments.Alongtheway,youshouldcomputeorestimatethevarianceinyourmeasurements,sothatyouknowhowmuchaveraging is required toget reliable information, especially

Page 12: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

forthevelocityprofile.Thesoftobjectiveforthistaskistomaximizeandevaluatethereliabilityofyourmeasurements.IfTask1orTask2havenotbeencompletedsuccessfully,youmaystillbeabletoobtainsome of the marks for this task by driving the motor directly (not through thecomputer)and/orobserving the floaterpositionmanually. Todrivea stepchange inthemotordrivesignaldirectly,youmayfinditusefultomanuallyintroducearesistorinparallelwiththetrimpot.Besuretorecordallrelevantdatainyourlabnotebook.Operatingconditions:

• SameasprevioustasksRequirements/specifications:

1. Abilitytodriveastepsignalintotherigandconcurrentlyrecordastepresponse(positioninmm)withinMatlab.

2. Inferenceofthesteady-stategaininthesystem3. Inferenceof“fixed”delayinthesystem4. Inferenceandreportingofanaveragevelocityprofile.

Softobjectives:1. Repeatability and reliability of results – it is expected that you will have

conducted multiple experiments yourself to measure the step response,analysing the results to obtain both a mean step response and the standarddeviationasafunctionoftimeoverthestepresponse.

Assessment for this task: Marksforthistaskareasfollows:

• Measurementofgain:(____/3)• Measurementofend-to-enddelay(mustbecomputer-based):(____/3)• Measurementandrecordingofvelocityprofile:(____/3)• Softobjective(reliableresults):(___/2)• Understanding(focusisonthevelocityprofile):(____/8)

Weeks in which this task may be completed: YoumaycompletethistaskinanyofWeeks9or10.

Page 13: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Task 5: Hunting Controller Thisisthefirstoftwotasksinwhichyou“closetheloop.”Thepurposehere,however,istodevelopaclosedloopsystemthatcanmovethefloaterintoapositionwhereyoursensingsystemrespondsmonotonically todisplacement. There isnorequirementonaccuracy. Since the floatermay start out either below or above the sensitive region,your control system will generally need to “hunt” for its position, adjusting the fanspeedupanddownaccordingtosomeschedule,untilthefloatercanbelocatedbythesensingsystem.Neitherstablenoractivepositioningofthefloaterisrequired.However,itisimportantthatthefloaterbothpartiallyobstructsthepathbetweentheholesinthePVCpipeandprovidesforamonotonicresponsefromyoursensingsystem.Notethatthefloaterhasasmall flangearoundthetopandbottom,whichwill interferewiththemonotonicityofanopticalsensingsystem.Youmayneedtotakethisintoaccountinyourdesign.Operatingconditions:

1. Yoursolutionshouldworkwhenthefloaterisdroppedintothepipefromabove.2. Your solution should also work when the floater position is disturbed by

blockingthelowerpartoftheslotinthePVCpipe.Requirements/specifications:

1. Yoursolutionshouldadjustthefanspeedinsuchawaythatthefloaterobstructsthe path between the holes in the PVC pipe, regardless of what position thefloaterstartsin.

2. Inresponsetoanexternaldisturbance(e.g.,partiallyblockingthefanintakeorpartiallycoveringtheslot in thePVCpipe),yoursolutionshouldadjust the fanspeed in suchawayas to restore the floater to aposition inwhich it satisfiesrequirement 1. This adjustment neednot be instantaneous, so the floater cantemporarilymoveawayfromablockingconditionafteranexternaldisturbance,solongasitisrestored.

3. In theabsenceofanyexternaldisturbance, the floatermustcontinue tosatisfyrequirement1–i.e.,itshouldnotdriftinandoutofthepathbetweentheholes.

Softobjectives:1. Itispreferabletominimizethetime(huntingtime)betweentheintroductionof

anexternaldisturbance(e.g.,partiallycoveringtheslotinthePVCpipe)andthepointfromwhichthefloaterconsistentlyobstructsthepathbetweentheholesinthePVCpipe.

Note: Youwill be awarded soft objectivemarks only if you can demonstrate thatyourdesignincludeseffectivemeasurestominimizethehuntingtime.

Assessment for this task: Marksforthistaskareasfollows:

• Achievementofrequirements:(___/8)• Softobjective(minimizehuntingtime):(___/2)• Understanding:(____/5)

Weeks in which this task may be completed: YoumaycompletethistaskinanyofWeeks9or10.

Page 14: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Task 6: Linear Control Thegoalofthistaskistodesignandbuildaclosedloopcontrolsystemwhichisabletocontrolthefaninsuchawaythatthefloaterispositionedaccurately.Forthistask,youwillmarkacontroltargetlocationonthePVCpipebydrawingathinline(orarrow)onmaskingtape.DonotmarkthePVCpipeitself.Naturally,thetargetlocationshouldliewithinthesensitiverangeofyoursensingsystem.Youareallowedtoadjusttheinitialsetpointofyourcontrolsysteminanywayyoulike--calibration.Afterthat,however,your control system should work to restore the floater to the target location whendisturbancesoccur.Disturbancesmaybeintroducedintwoways. ThetrimpotassociatedwithyourPWMdrivesystemmaybeadjustedto introduceadisturbance in thedrivesignal thatyourautomatic control system should correct. The air flow in the control rig may bemodifiedbypartiallycoveringtheslot in thePVCpipe,orbypartiallyobstructing thefan inlet. In response to all such changes, your control system should automaticallyrestorethelocationofthefloatertothemarkedtargetposition.Yourcontrolsystemisrequiredtobestable,bothwithandwithoutdisturbances.Yourcontrolsystemisrequiredtoachieveafloaterpositionthatiswithin5mmofthesetpointafterthe introductionofanyreasonabledisturbance(onefromwhichautomaticcontrolcouldbeexpectedtorecover).Youshouldbepreparedtoexplainwhythislevelofaccuracycouldbeexpectedatsteadystate.

Notethatthe5mmhereallowsforjitterinthefloaterposition,whichispresentevenwhen thevoltageapplied to the fanmotor is constant. If youareable todemonstratethatyourcontrolrigexhibitsunusuallylargeamountsofjitter,theaccuracyrequirementforyourdesignwillberelaxedaccordingly.

Forthisdesigntask,yoursoftobjectiveistodesignasolutionwhichbringsthefloaterto within8mm of the target position as quickly as possible. To gain understandingmarksforthesesoftobjectives,youmustbeabletoexplainhowyouhavetheoreticallymodeledthecontrolsystemanddesigneditsparameters.Youshouldbearinmindthatdelayandinertialpropertiesofthecontrolrigmayrenderaclosedloopcontrolsystemunstable. Youshouldinvesteffort inunderstandinghowdelaycanbemodeled.Whilethereisnospecificrequirementorobjectiverelatedtoundershootorovershootinthiscontroltask,youshouldbearinmindthatovershoot/undershootinyourcontrolsystemmightmovethefloateroutsidethesensitiveregionofyoursensingsystem.While you can bemarked for this task even if you have not completed Task 5, goodsolutionstoTask6shouldfallbacktoahuntingmethod(Task5) if the floatermovesoutsidethesensitiveregion.

Assessment for this task: Marksforthistaskareasfollows:

• Achievementofrequirements:(___/6)• Softobjective:(___/5)• Understandingofdelayandstabilityissues:(____/3)• Understandingofsteadystatebehaviour:(___/3)• Understandingrequiredtoaddresssoftobjective:(___/3)

Page 15: ELEC4123, S1, 2018 › elec4123 › Control-Tasks.pdf · 2018-06-05 · PVC pipe. The apparatus is illustrated roughly Figure 1, but additional illustrations and photos may be provided

Weeks in which this task may be completed: YoumaycompleteandbeassessedforthistaskonlyinWeek10.