[go: up one dir, main page]

0% found this document useful (0 votes)
47 views4 pages

For M1: Open Loop:: All 'S' 'Response' 'Time' 'Amplitude'

The document contains the code to model open loop and closed loop systems for three different transfer functions (M1, M2, M3). For each transfer function, the open loop and closed loop responses are plotted. The open loop responses show the system output over time without feedback. The closed loop responses show the system output over time with feedback incorporated through a feedback loop, which stabilizes the response.

Uploaded by

Rasheed Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views4 pages

For M1: Open Loop:: All 'S' 'Response' 'Time' 'Amplitude'

The document contains the code to model open loop and closed loop systems for three different transfer functions (M1, M2, M3). For each transfer function, the open loop and closed loop responses are plotted. The open loop responses show the system output over time without feedback. The closed loop responses show the system output over time with feedback incorporated through a feedback loop, which stabilizes the response.

Uploaded by

Rasheed Shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

For M1:

Open loop:
clear all step (G)
clc title('response')
s=tf('s') xlabel('time')
num=[1] ylabel('amplitude')
den=[2 2 1] plot(x,y)
G=tf(num,den) figure

response
1.4

1.2

1
a m p litu d e

0.8

0.6

0.4

0.2

0
0 2 4 6 8 10 12
time (sec)

Close loop:
clear all step (k)
clc title('response')
num=[1] xlabel('time')
den=[2 2 1] ylabel('amplitude')
G=tf(num,den) plot(x,y)
H=1 figure
c=series(H,G)
k=feedback(c,+1)
response
0.7

0.6

0.5
a m p litu d e
0.4

0.3

0.2

0.1

0
0 2 4 6 8 10 12
time (sec)

For M2:
Open loop:
clear all title('open loop')
clc xlabel('time')
s=tf('s') ylabel('amplitude')
num=[1] plot(x,y)
den=[1 2 1] figure
G=tf(num,den)
step (G)

open loop
1

0.9

0.8

0.7

0.6
amplitude

0.5

0.4

0.3

0.2

0.1

0
0 5 10 15
time (sec)

Close loop:
clear all c=series(H,G)
clc k=feedback(c,+1)
num=[1] step (k)
den=[1 2 1] title('response')
G=tf(num,den) xlabel('time')
H=1 ylabel('amplitude')
plot(x,y) figure
response
0.7

0.6

0.5
a m p litu d e

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
time (sec)

Foe M3:
Open loop:
clear all step (G)
clc title('open loop')
s=tf('s') xlabel('time')
num=[1] ylabel('amplitude')
den=[1 1 1] plot(x,y)
G=tf(num,den) figure
open loop
1.4

1.2

1
a m p litu d e

0.8

0.6

0.4

0.2

0
0 2 4 6 8 10 12
time (sec)

Close loop:

clear all k=feedback(c,+1)


clc step (k)
num=[1] title('response')
den=[1 1 1] xlabel('time')
G=tf(num,den) ylabel('amplitude')
H=1 plot(x,y)
c=series(H,G) figure
response
0.7

0.6

0.5
a m p litu d e

0.4

0.3

0.2

0.1

0
0 2 4 6 8 10 12
time (sec)

You might also like