Language:EN
Pages: 194
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
the continuous time fourier transform scilab codes

The continuous time fourier transform scilab codes

Scilab Code for
Signals and Systems
by Alan V. Oppenheim, Alan V. Willsky, S.Hamid Nawab1

Created by
Prof. R. Senthilkumar
Institute of Road and Transport Technology rsenthil signalprocess@in.com

Author: Alan V. Oppenheim, Alan V. Willsky, S.Hamid Nawab Title: Signals and Systems
Publisher: Prentice-Hall India
Edition: Second
Year: 1992
Place: New Delhi
ISBN: 978-81-203-1246-3

1

2 Linear Time Invariant Systems 26

2.1 Scilab Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5 The Discreet Time Fourier Transform 117

5.1 Scilab Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.1 Scilab Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

9 The Laplace Transform 155

11 Linear Feedback Systems 181

11.1 Scilab Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

1.3 Example1.3.sce . . . . . . . . . . . . . . . . . . . . . . . . 13

1.4 Example1.4.sce . . . . . . . . . . . . . . . . . . . . . . . . 14

1.13b Example1.13b.sce . . . . . . . . . . . . . . . . . . . . . . . 18

1.14 Example1.14.sce . . . . . . . . . . . . . . . . . . . . . . . . 18

1.20 Example1.20.sce . . . . . . . . . . . . . . . . . . . . . . . . 24

2.1 Example2.1.sce . . . . . . . . . . . . . . . . . . . . . . . . 26

2.7 Example2.7.sce . . . . . . . . . . . . . . . . . . . . . . . . 45

2.8 Example2.8.sce . . . . . . . . . . . . . . . . . . . . . . . . 49

3.6 Example3.6.sce . . . . . . . . . . . . . . . . . . . . . . . . 66

3.7 Example3.7.sce . . . . . . . . . . . . . . . . . . . . . . . . 68

3.8 Example3.8.sce . . . . . . . . . . . . . . . . . . . . . . . . 71
3.10 Example3.10.sce . . . . . . . . . . . . . . . . . . . . . . . . 74
3.11 Example3.11.sce . . . . . . . . . . . . . . . . . . . . . . . . 76
3.12 Example3.12.sce . . . . . . . . . . . . . . . . . . . . . . . . 80
3.13 Example3.13.sce . . . . . . . . . . . . . . . . . . . . . . . . 82
3.14 Example3.14.sce . . . . . . . . . . . . . . . . . . . . . . . . 85
3.15 Example3.15.sce . . . . . . . . . . . . . . . . . . . . . . . . 87
4.1 Example4.1.sce . . . . . . . . . . . . . . . . . . . . . . . . 90
4.2 Example4.2.sce . . . . . . . . . . . . . . . . . . . . . . . . 93
4.4 Example4.4.sce . . . . . . . . . . . . . . . . . . . . . . . . 95
4.5 Example4.5.sce . . . . . . . . . . . . . . . . . . . . . . . . 97
4.6 Example4.6.sce . . . . . . . . . . . . . . . . . . . . . . . . 99
4.7 Example4.7.sce . . . . . . . . . . . . . . . . . . . . . . . .
4.8 Example4.8.sce . . . . . . . . . . . . . . . . . . . . . . . .
4.9 Example4.9.sce . . . . . . . . . . . . . . . . . . . . . . . .
4.12 Example4.12.sce . . . . . . . . . . . . . . . . . . . . . . . .

108

4.18 Example4.18.sce . . . . . . . . . . . . . . . . . . . . . . . .

110

4.23 Example4.23.sce . . . . . . . . . . . . . . . . . . . . . . . .
4.22 Impulse response of LTI system . . . . . . . . . . . . . . .
5.1 Example5.1.sce . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Example5.2.sce . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Example5.3.sce . . . . . . . . . . . . . . . . . . . . . . . .

123

5.5 Example5.5.sce . . . . . . . . . . . . . . . . . . . . . . . .

125

5.6 Example5.6.sce . . . . . . . . . . . . . . . . . . . . . . . .
5.7 Example5.7.sce . . . . . . . . . . . . . . . . . . . . . . . .
5.9 Example5.9.sce . . . . . . . . . . . . . . . . . . . . . . . .
5.12 Example5.12.sce . . . . . . . . . . . . . . . . . . . . . . . .
5.15 Example5.15.sce . . . . . . . . . . . . . . . . . . . . . . . .

135

6.1 Example6.1.sce . . . . . . . . . . . . . . . . . . . . . . . .

138

6.3 Example6.3.sce . . . . . . . . . . . . . . . . . . . . . . . .
6.4 Example6.4.sce . . . . . . . . . . . . . . . . . . . . . . . .
6.5 Example6.5.sce . . . . . . . . . . . . . . . . . . . . . . . .
7.1 Example7.1.sce . . . . . . . . . . . . . . . . . . . . . . . .
7.2 Example7.2.sce . . . . . . . . . . . . . . . . . . . . . . . .

149

7.3 Example7.3.sce . . . . . . . . . . . . . . . . . . . . . . . .

150

7.4 Example7.4.sce . . . . . . . . . . . . . . . . . . . . . . . .
7.5 Example7.5.sce . . . . . . . . . . . . . . . . . . . . . . . .
9.1 Example9.1.sce . . . . . . . . . . . . . . . . . . . . . . . .

9.2 Example9.2.sce . . . . . . . . . . . . . . . . . . . . . . . . 155

9.3 Example9.3.sce . . . . . . . . . . . . . . . . . . . . . . . . 155

9.8 Example9.8.sce . . . . . . . . . . . . . . . . . . . . . . . . 157

9.9 Example9.9.sce . . . . . . . . . . . . . . . . . . . . . . . . 158

9.14 Example9.14.sce . . . . . . . . . . . . . . . . . . . . . . . . 163

9.15 Example9.15.sce . . . . . . . . . . . . . . . . . . . . . . . . 164

9.20 Example9.20.sce . . . . . . . . . . . . . . . . . . . . . . . . 166

9.21 Example9.21.sce . . . . . . . . . . . . . . . . . . . . . . . . 166

9.35 Example9.35.sce . . . . . . . . . . . . . . . . . . . . . . . . 168

9.36 Example9.36.sce . . . . . . . . . . . . . . . . . . . . . . . . 169

10.3 Example10.3.sce . . . . . . . . . . . . . . . . . . . . . . . . 172

10.4 Example10.4.sce . . . . . . . . . . . . . . . . . . . . . . . . 172

10.10 Example10.10.sce . . . . . . . . . . . . . . . . . . . . . . . 174

10.11 Example10.11.sce . . . . . . . . . . . . . . . . . . . . . . . 175

10.19 Example10.19.sce . . . . . . . . . . . . . . . . . . . . . . . 176

10.23 Example10.23.sce . . . . . . . . . . . . . . . . . . . . . . . 177

10.37 Example10.37.sce . . . . . . . . . . . . . . . . . . . . . . . 180

11.1 Example11.1.sce . . . . . . . . . . . . . . . . . . . . . . . . 181

11.6 Example11.6.sce . . . . . . . . . . . . . . . . . . . . . . . . 187

11.7 Example11.7.sce . . . . . . . . . . . . . . . . . . . . . . . . 188

List of Figures

1.1 Results of Exa 1.5 . . . . . . . . . . . . . . . . . . . . . . . . 15

2.4 Results of Exa 2.3 . . . . . . . . . . . . . . . . . . . . . . . . 31

2.5 Results of Exa 2.3 . . . . . . . . . . . . . . . . . . . . . . . . 32

2.10 Results of Exa 2.5 . . . . . . . . . . . . . . . . . . . . . . . . 39

2.11 Results of Exa 2.5 . . . . . . . . . . . . . . . . . . . . . . . . 40

2.16 Results of Exa 2.7 . . . . . . . . . . . . . . . . . . . . . . . . 47

2.17 Results of Exa 2.7 . . . . . . . . . . . . . . . . . . . . . . . . 48

3.1 Results of Exa 3.2 . . . . . . . . . . . . . . . . . . . . . . . . 57

3.2 Results of Exa 3.2 . . . . . . . . . . . . . . . . . . . . . . . . 58

3.6 Results of Exa 3.5 . . . . . . . . . . . . . . . . . . . . . . . . 65

3.7 Results of Exa 3.5 . . . . . . . . . . . . . . . . . . . . . . . . 66

3.12 Results of Exa 3.10 . . . . . . . . . . . . . . . . . . . . . . . 76

3.13 Results of Exa 3.11 . . . . . . . . . . . . . . . . . . . . . . . 79

3.18 Results of Exa 3.15 . . . . . . . . . . . . . . . . . . . . . . . 89

4.1 Results of Exa 4.1 . . . . . . . . . . . . . . . . . . . . . . . . 92

4.6 Results of Exa 4.6 . . . . . . . . . . . . . . . . . . . . . . . . 101

4.7 Results of Exa 4.7 . . . . . . . . . . . . . . . . . . . . . . . . 103

4.12 Results of Exa 4.18 . . . . . . . . . . . . . . . . . . . . . . . 112

4.13 Results of Exa 4.23 . . . . . . . . . . . . . . . . . . . . . . . 113

5.3 Results of Exa 5.2 . . . . . . . . . . . . . . . . . . . . . . . . 123

5.4 Results of Exa 5.3 . . . . . . . . . . . . . . . . . . . . . . . . 125

5.8 Results of Exa 5.9 . . . . . . . . . . . . . . . . . . . . . . . . 133

5.9 Results of Exa 5.12 . . . . . . . . . . . . . . . . . . . . . . . 135

6.4 Results of Exa 6.3 . . . . . . . . . . . . . . . . . . . . . . . . 145

6.5 Results of Exa 6.4 . . . . . . . . . . . . . . . . . . . . . . . . 146

9.2 Results of Exa 9.13 . . . . . . . . . . . . . . . . . . . . . . . 161

9.3 Results of Exa 9.13 . . . . . . . . . . . . . . . . . . . . . . . 162

11.4 Results of Exa 11.5Bode . . . . . . . . . . . . . . . . . . . . 185

11.5 Results of Exa 11.5Nyquist . . . . . . . . . . . . . . . . . . . 186

11.10Results of Exa 11.9 . . . . . . . . . . . . . . . . . . . . . . . 193

10

1 // Example 1 . 1 : Time S h i f t i n g

2 //SIGNALS & SYSTEMS, Second Edition

7 clc;

8 close;

13 for i = length(t)+1:2* length(t)

14 x(i) = 1-t(i-length(t));

19 // t4 = 0:1/ length ( t3 ) : 1 ;

20 //Mid =c e i l ( l en gth ( t3 ) /2) ;

2 //SIGNALS & SYSTEMS, Second Edition

3 //V.OPPENHEIM, S .WILLSKY, S .HAMID NAMWAB

8 close;

9 t3 = 0:1/100:4/3;

13
14
15
16
17
18
19
20
21
22

x3(i) = 1 ;
end
for i = Mid +1: length(t3)
x3(i) = 1-t4(i-Mid);
end
figure
a=gca();
plot2d(t3 ,x3)
a.thickness =2;

xtitle( ’ Time S c a l i n g

13

Example 1.4 Combinationation two periodic signals Aperiodic signal

1 // Example
two p e r i o d i c
2 // Aperiodic

s i n t

3

// Page 12

4
5
6
7

// Frequency

= 1 Hz

8
9
10
11
12

a=gca();

13

plot(t2 ,x2);

14
15
16
17
s i g n a l

x ( t ) = c o s t

f o r
f o r

t > 0 :

e x p o n e n t i a l s

2 // as a s i n g l e s i n u s o i d

7 x1 = exp(sqrt (-1)*2*t);

8 x2 = exp(sqrt (-1)*3*t);

13 plot(t,X);

14

14 xtitle( ’ Fu l l wave r e c t i f i e d s i n u s o i d ’ , ’ time

Example 1.6 Determining the fundamental period of composite discrete

time signal

4 //x [ n ] = exp ( j (2 %pi /3) n )+exp ( j (3 %pi /4) n ) clear all;

15

5
2
6
7 Omega1 = 2*%pi /3;
frequency s i g n a l
8 Omega2 = 3*%pi /4; // Angular frequency s i g n a l
9
N1 = (2* %pi)/Omega1; // Peirod of

s i g n a l

1

10 N2 = (2* %pi)/Omega2; // Period of
11 //To f i n d
of s i g n a l

1

12

for m1 = 1:100

13
14
15
16
17

break;

18

end

19
20 //To f i n d
of s i g n a l
21

for m2 = 1:100

22

period = N2*m2;

23
24
25
26
27

end

28

end

29
30
31 //To determine the fundamental
32

Example 1.12 Classification of system:Causality property

2
i s
3 //To check whether the given d i s c r e t e system
4 Causal System

system y [ n]= x[n ]

// Given

5
8 n = -length(x)/2: length(x)/2; a c a u s a l
9
10
11

y = zeros(1, length(x));

12

y(mid +1:$) = x($:-1:mid +1);

13 for n =
14
15
16
17

if (y(i)==x(i))

18

count = count +1;

19
20
21
22

system

i s
23

else

f u t u r e
24 disp( ’ Since i t depends on
25
i s

a nonc a u s a l

system ’ )
26

end

13
input i s bounded output

i s

unbounded ’ )

Example 1.13b Determination of stability of a given system

1 // Example 1 . 1 3 ( b ) : Determination

of

of
2 given

// Page 50

3 // given

system y ( t ) = exp ( x ( t ) )

4
5
6
7
8

for t = 0: Maximum_Limit -1

9

x(t+1)= -2^t;

// Input
10
11
12
13

disp( ’ Eventhough

input i s

bounded

output i s

Example 1.14 Classification of a system:Time Invariance Property

18

4 // The given v a r i a n t ( or ) Time Inv a r i a n t d i s c r e t e s i g n a l i s y ( t ) = s i n ( x ( t ) )

5 clear;

10 x(t) = (2* %pi/T)*t;

11 y(t) = sin(x(t));

16 if(Input_shift == Output_shift)

17 disp( ’ The given

20

end

19

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Terry Johnson MD

PageId: DOC9960362