Høgskolen i Buskerud Løsning til skriftlig eksamen i emnet SESM3401 Styring av mekatroniske systemer Eksamensdato: Mandag 8. desember 2008. Varighet: 3 timer. Vekt: 70%. Hjelpemidler: Ingen trykte eller håndskrevne hjelpemidler. Kalkulator ikke tillatt. Kontakt under eksamen: 1. am. Finn Haugen(telefon 97019215) Hvis du mener at det i en oppgave mangler forutsetninger for løsning, skal du selv definere disse forutsetningene slik at du allikevel kan løse oppgaven. 1. (15% vekt i dette oppgavesettet) Den logiske funksjonen y=(x 1 ANDx 2 ) ORx 3 (1) kanrealiseresmedladderdiagramsomvistifigur1ogmed x1 x2 y x3 Figur 1: funksjonsblokkdiagram som vist i figur 2. x 1 x 2 & x 3 1 y Figur 2: 2. (15%)Sefigur3. 3. (15%)Frakompendiet:Atimerfunctionissimilartoaclockwhichis started(triggered) by a starting signal changing value from OFF to ON.Whenapresettimehaselapsed,thetimeroutputissettoON. 1
Set Reset Out Out Figur 3: Asanexample,atimercanbeusedtoimplementatime-delayed startofamotor.anotherexampleistocontroltheon-timeofa heater. PLCs have a number of different timers in their functions library. Figure4showsanexampleofatimer.(Theexamplecanbefoundin auser smanualofthegxiecdeveloperprogrammingtoolof Mitsubishi PLCs.) The timer parameters are as follows. x0 Inputs EN Timer1 Q Outputs M0 T#1m10s25ms PT ET D0 Figur 4: Input EN(enable)[boolean] starts or triggers the timer. InputPT(presettime)[time]isthe(elapsed)timeortime delaybeforethetimeroutputqissettoon.thetimeformat isaspecialdataformatusedtorepresenttime.infigurethe PTvalueis1minute10second25milliseconds. OutputQ(output 1 )[boolean]isthetimeroutput.itgetsvalue ONwhentheelapsedtimeislargerthanthepresettime. Output ET(elapsed time)[time] is the continuously running time. Figure5showsatimingdiagramwhichshowsthebehaviourofthe timer along a time axis. The timer operates as follows: 1 Q means output. The ideal symbol O for output is not used since it is too easily misinterpreted as zero. 2
EN: OFF (0) ON (1) 1m10s25ms ET: 0s ON (1) Q: OFF (0) Time: t 0 t 1 t 2 t 3 t 4 Elapsed time is PT=1m10s25ms Elapsed time is less than PT Figur 5: Thetimerstartswhentheinputx0attheENinputgoesfrom OFFtoON.Asthetimerstarts,theEToutputincreases continuously from the initial value of 0 seconds. In this example, theettimevalueisstoredinthedataregisterd0whichisa generalregisterormemorycellwhereavaluecanbestoredfor use in subsequent programming expressions. WhentheETtimehasbecomelargerthanthePT(presettime) valuethebooleanoutputqissettoon.inthisexample,the valueofqisstoredinmemorycellm0whichisageneral memorycellwhereabooleanvaluecanbestoredforusein subsequent programming expressions. IfENgoesfromONtoOFF,ETisresettozero. 4. (15%) Transferfunksjonen for motor med sensor(prosessen) er H(s)= K Ts+1 (2) derk ogt harkjenteverdier.deterspesifisertat reguleringssystemetsresponstidt C skalværeomtrentlikt.fårda 3
ihht. Skogestads tabell: K p = T KT C = T KT = 1 K (3) T i =min[t,1.44t C ]=min[t,1.44t]=t (4) 5. (25%) Sekvesiell styring av en batch-prosess(fra kompendiet benyttetiemnet):figure6showsasimplebatchprocess.thetank tank. Figur 6: A batch process to be controlled by sequential control isfilledwithwater.thewateristhenheatedandstirred 2,andfinally the heated water is discharged from the tank. The control signals are u_valve_in(boolean, i.e. having value TRUE or FALSE, or ON or OFF) u_valve_out(boolean) u_motor(boolean) u_heat(continuous having any value between 0% and 100%) 2 Themotorisassumedtoensurehomogenuousthermalconditionsinthewaterinthe 4
The measurements are TemperatureT ofthewaterinthetank Levelhofthewaterinthetank Intheexamyouareaskedtodrawastatediagramofthecontrol system. The state diagram will be identical to the SFC(Sequential FunctionChart)showninFigure7.E.g.thestates ares0,s1,etc. The actions are A0_1, A0_2, etc. The transitions are T0_1, T1_2, etc. S0 (Init) Transition T0_1: Start_Batch_Button == TRUE; Actions: A0_1: u_valve_in := OFF; A0_2: u_valve_out := OFF; A0_3: u_motor := OFF; A0_4: PID_auto := OFF; S1 (Filling) A1_1: u_valve_in := ON; T1_2: Level >= Level_High; S2 (Heat. Stirr.) T2_3: Timer_Value >= 10000 s; A2_1: u_valve_in := OFF; A2_2: u_motor := ON; A2_3: PID_auto := ON; A2_4: Timer_Enable := ON; S3 (Emptying) A3_1: u_valve_out := ON; A3_2: u_motor := OFF; T3_4: Level <= Level_Low; S4 (Pause) A4_1: u_valve_out := OFF; A4_2: PID_auto := OFF; T4_1: Restart_Button == ON; T4_5: Finish_Button == ON; S5 (End) Figur 7: 6. (5%) Posisjonen er den tidsintegrerte av hastigheten. I s-planet 5
uttrykkes tidsintegrasjon med divisjon med s. Transferfunksjonen fra pådragetutilposisjonenxblirda K (Ts+1)s (5) 7. (10%) HIL-simulering: Fysisk reguleringsutstyr(kalt ECU Electronic Control Unit) regulerer en simulert prosess. HIL-simulering kan være nyttig for testing og opplæring. 6