%RT I Serie 3 Aufgabe 2 Marco & Bryan %___________________________________________________________________ clc; clear all; close all; %Konstanten omega=1; %Vetor mit Dämpfungswerten delta=[0.05 0.01 0.2 0.33 0.5 0.7 5]; %Transferfunktion s=tf('s'); % figure('Name','M-Serie 3 Aufgabe 2 BODE Marco & Bryan') %For Schleife Nyquist / Bode PLOT for i=1:1:7 % Aus Seite 112 / 113 %Geleichung 8.14 sys1=omega^2/(s^2+2*omega*delta(i)*s+omega^2); %Bode figure(1) hold on bode(sys1) %Nyquist figure(2) hold on nyquist(sys1) end %Aufgabe 2 Teilaufgabe b) %________________________________________________________________ %Konstanten T=0.5; d=0.1; k=1; sysorg=omega^2/(s^2+2*d*omega*s+omega^2); %Tiefpass: sys2=k/(1+T*s); %in Serie mit sys1: %sys3=sysorg*sys2; sys3=series(sysorg,sys2); %series eignet sich besser, obwohl hier eine normale Multiplikation %ausreichen würde. %einfacher P-Regler: sysP=tf([0.3],[1]); %totales System L: sysLP=sysP*sys3; %Plot BODE figure('Name','RT I M-Serie 3 Aufgabe 2c) Bode') bode(sysLP) margin(sysLP) %zeichnet Wc etc. ein % ii) [magL,phaseL,WcgL,WcpL]=margin(sysLP); %Aufgabe 2 Teilaufgabe d %__________________________________________________________________________ %PID Regler k1=0.5; Ts1=5; Td1=4; PID=k1*(1+1/(Ts1*s)+Td1*s); %Serieschaltung sysLPID=sys3*PID; %Bode Plot figure('Name','RT I M-Serie 3 Aufgabe 2d) Bode') bode(sysLPID) margin(sysLPID) %zeichnet Wc etc. ein %ii) [magLPID,phaseLPID,WcpLPID,WcpLPID]=margin(sysLPID); %Aufgabe 2 Teilaufgabe e %__________________________________________________________________________ %nyquist Plot L-System figure('Name','RT I M-Serie 3 Aufgabe 2e) Nyquist des LP- Systems') nyquist(sysLP) %nyquist Plot LPID- System figure('Name','RT I M-Serie 3 Aufgabe 2e) Nyquist des LPID- Systems') nyquist(sysLPID) %Aufgabe 2 Teilaufgabe f %__________________________________________________________________________ % % System L Feedback figure('Name','RT I M-Serie 3 Aufgabe 2f) Stepresponse LP- Systems gegenüber LPID- System') Fb_1=feedback(sysLP,1); % System LPID Feedback Fb_2=feedback(sysLPID,1); %Plot step(Fb_1,'g',Fb_2,'r') %__________________________________________________________________________ %titel der Grafiken figure(1) title('Aufgabe 2a) Bode-Plot Marco & Bryan') figure(2) title('Aufgabe 2a) Nyquist-Plot Marco & Bryan') figure(3) title('Aufgabe 2c) Bode-Plot des System LP Marco & Bryan') figure(4) title('Aufgabe 2d) Bode-Plot des System L-PID Marco & Bryan') figure(5) title('Aufgabe 2e) Nyquist-Plot des System LP Marco & Bryan') figure(6) title('Aufgabe 2e) Nyquist-Plot des System L-PID Marco & Bryan') figure(7) title('Aufgabe 2f) Stepresponse des LP gegenüber dem LPID -System Marco & Bryan') legend('LP-System','LPID-System')