Sunteți pe pagina 1din 31

discrete unit step sequence

amplitude

0.5

amplitude

5
6
7
n
continuous unit step signal

10

10

1.5
1
0.5
0

5
n

unit impulse sequence

1
0.9
0.8

amplitude

0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-5

-4

-3

-2

-1

0
n

sine signal

amplitude

1
0.5
0
-0.5
-1

amplitude

5
6
time
cosine signal

10

10

0.5
0
-0.5
-1

5
time

square signal

2
1.5
1

Amplitude

0.5
0
-0.5
-1
-1.5
-2

6
time

10

12

rectangular signal

2
1.5
1

Amplitude

0.5
0
-0.5
-1
-1.5
-2

5
time

10

positive ramp signal

5
time

5
time
negative ramp

10

5
time

10

10

10

Amplitude

Amplitude

10

5
time
negative ramp

positive ramp signal

10
Amplitude

Amplitude

10

10

saw tooth wave

Amplitude

1
0.5
0
-0.5
-1

0.01

0.02

0.03

0.04

0.05
Time

0.06

0.07

0.08

0.09

0.1

0.01

0.02

0.03

0.04

0.05
time

0.06

0.07

0.08

0.09

0.1

amplitude

1
0.5
0
-0.5
-1

OUTPUT
Signal 1 : Sine Wave of Frequency 1/3 Hz

x1(t)

1
0
-1

x2(t)

15
20
Time Index t (sec.)
Signal 2 : Sine Wave of Frequency 1/5 Hz

25

30

10

25

30

25

30

25

30

0
-1

y(t) = x1(t) + x2(t)

10

15
20
Time Index t (sec.)
Resultant Signal : Signal 1 + Signal 2

0
-2

10

15
20
Time Index t (sec.)

OUTPUT
Signal 1 : Sine Wave of Frequency 1/3 Hz

x1(t)

1
0
-1

10

10

x2(t)

15
20
Time Index t (sec.)
Signal 2 : Sine Wave of Frequency 1/5 Hz

0
-1

y(t) = x1(t) .* x2(t)

10

15
20
25
Time Index t (sec.)
Resultant Signal : Dot Product of Signal 1 and Signal 2

30

0
-1

15
20
Time Index t (sec.)

25

30

OUTPUT
Signal 1 : Sine Wave of Frequency 1/5 Hz

x(t)

1
0
-1
-2

4
5
6
7
Time Index t (sec.)
Signal 2 : Scaled Version of Signal 1

10

10

y(t)

1
0
-1
-2

4
5
6
Time Index t (sec.)

OUTPUT
Original Signal

0.8

x(nx)

0.6
0.4
0.2
0

100

200

300

400

0
-1000

-900

-800

-700

-600

0.8

500
600
nx
Folded Signal

700

800

900

1000

-300

-200

-100

xf(nf)

0.6
0.4
0.2

OUTPUT

-500
nf

-400

amplitude
amplitude
amplitude

original signal

4
2
0

1.5

2.5
3
samples
even part of sequence

3.5

1.5

2.5
3
samples
odd part of sequence

3.5

1.5

3.5

4
2
0

2
0
-2

2.5
samples

OUTPUT
Energy of the signal (1/2). n

1
0.9
0.8

amplitude

0.7
0.6
0.5
0.4
0.3
0.2
0.1
0

10

time n

15

20

25

Output:
Type a value for N 1
The calculated power of the signal
P=
0.3750

input signal

1
0.9
0.8

amplitude

0.7
0.6
0.5
0.4
0.3
0.2
0.1
0

0.01

0.02

0.03

0.04

0.05
time n

0.06

0.07

0.08

Result: Hence the energy and power of the signal are calculated.

0.09

0.1

Output:
Enter x[n]: [1 2 3 4]
Enter h[n]: [1 2]
Z=
1 4 7 10 8
Input sequence x[n]

Amplitude

4
2
0

0.5

1.5
2
Time
Impulse response of the system h[n]

Amplitude

1
0

0.1

0.2

0.3

0.4

0.5
0.6
Time
Linear Convolution

10
Amplitude

2.5

0.7

0.8

0.9

5
0

0.5

1.5

2
Time

2.5

3.5

Output:
enter x[n]: [1 2 3 4]
Enter h[n]: [1 2]
xnew =
1

hnew =
1
xf =
10.0000

-4.0451 - 1.3143i 1.5451 - 2.1266i 1.5451 + 2.1266i -4.0451 + 1.3143i

hf =
3.0000

1.6180 - 1.9021i -0.6180 - 1.1756i -0.6180 + 1.1756i 1.6180 + 1.9021i

zf =
30.0000
1

Amplitude

Amplitude

Amplitude

z=

-9.0451 + 5.5676i -3.4549 - 0.5020i -3.4549 + 0.5020i -9.0451 - 5.5676i


7

10
First sequence x(n)

4
2
0

0.5

1.5
2
time
Second sequence h(n)

2.5

1
0

0.1

0.2

0.3

0.4

10

0.5
0.6
time
Convolution

0.7

0.8

0.9

5
0

0.5

1.5

2
time

2.5

Result:
The convolution of two sequences is done in time and frequency domain.

3.5

Output:
Enter x[n] : [1 2 3 4]
Rxx =
4.0000 11.0000

20.0000

30.0000

Amplitude

11.0000

4.0000

Input sequence x[n]

4
3
2
1
0

0.5

-2

-1

30
Amplitude

20.0000

1.5
2
Time
Autocorrelation of x[n]

2.5

20
10
0
-3

0
Time

Output:
Enter the first sequence x[n]: [1 2 3 4]
Enter the second sequence y[n]: [5 6 7 8]
Rxy =

Amplitude

Amplitude

Amplitude

8.0000 23.0000 44.0000 70.0000 56.0000 39.0000 20.0000


Input sequence x[n]

4
2
0

0.5

0.5

10

1.5
Time
Input sequence y[n]

2.5

2.5

5
0

100

1.5
2
Time
Cross correlation of x[n] and y[n]

50
0
-3

-2

-1

0
Time

Result: the autocorrelation and cross correlation of the signals is obtained.

Output:

enter
enter
enter
enter

pass
stop
pass
stop

band
band
band
band

ripple 2
ripple 10
frequency 2000
frequency 8000

n =
1
wn =
1.6755e+004
b =
1.0e+004 *
0

1.6755

a =
1.0e+004 *
0.0001

1.6755
magnitude response

1.01

1
0.99
0.98
0

100

200

300

400
500
600
normalised frequency
phase reponse

700

800

900

1000

100

200

300

400
500
600
normalised frequency

700

800

900

1000

-0.05
-0.1
-0.15
-0.2

Result: the response of butterworth low pass filter is obtained.

Output:
enter
enter
enter
enter

pass
stop
pass
stop

band
band
band
band

ripple 2
ripple 10
frequency 8000
frequency 2000

n =
1
wn =
3.7699e+004
b =
1

a =
1.0e+004 *
0.0001

3.7699
magnitude response

0.8

0.6
0.4
0.2
0

2000

4000

6000
8000
10000
normalised frequency
phase reponse

12000

14000

16000

2000

4000

6000
8000
10000
normalised frequency

12000

14000

16000

1.5
1
0.5
0

Result: the response of butterworth high pass filter is obtained.

Output:

Result:
Hence the IIR low pass filter is designed using Chebyshev approximations.

Output:

Result:
Hence the IIR high pass filter is designed using Chebyshev approximations.

Output:

Result:
Hence an FIR LPF is designed for the given specifications using different window
techniques.

Output:

Result:
Hence an FIR HPF is designed for the given specifications using different
window techniques.

OUTPUT

Continuous time signal: x(t) = cos(2F1t) + cos(2F2t)

1.5
1

x(t)

0.5
0
-0.5
-1
-1.5
-2
-0.4

-0.3

-0.2

-0.1

0
0.1
Time t (sec)

0.2

0.3

0.4

Discrete Time Signal

Fs < 2Fmax
1.5
1

Amplitude

0.5
0
-0.5
-1
-1.5
-2
-0.4

-0.3

-0.2

-0.1
0
0.1
Time Sample (n)

0.2

0.3

0.4

Discrete Time Signal

Fs > 2Fmax
1.5
1

Amplitude

0.5
0
-0.5
-1
-1.5
-2
-0.4

-0.3

-0.2

-0.1
0
0.1
Time Sample (n)

0.2

0.3

0.4

Discrete Time Signal

Fs = 2Fmax
1.5
1

Amplitude

0.5
0
-0.5
-1
-1.5
-2
-0.4

-0.3

-0.2

-0.1
0
0.1
Time Sample (n)

0.2

0.3

0.4

Result : Under sampling , Nyquist sampling and Over sampling have been observed.

Output:
Enter the Decimation factor= 4
original signal

Amplitude

2
1
0
-1
-2

20

40

60
time n
Decimated signal

80

100

120

10

15
time n

20

25

30

Amplitude

2
1
0
-1
-2

Result: thus downsampling is performed on the signal with a factor of 4.

Output:
Enter the interpolation factor= 4
original signal

Amplitude

2
1
0
-1
-2

10

15
time n
Interpolated signal

20

25

30

20

40

60
time n

80

100

120

Amplitude

2
1
0
-1
-2

Result: thus the signal is upsampled by a factor of 4.

Output:
enter the input frequency:100
sampling frequency 500

Power Spectral Density Estimate via Periodogram

Power/frequency (dB/Hz)

-10
-20
-30
-40
-50
-60
-70

0.05

0.1
0.15
Frequency (kHz)

Result: The output is observed and the graphs are plotted.

0.2

0.25

OUTPUT:

Power Spectral Density Estimate via Periodogram

-10

Power/frequency (dB/Hz)

-20
-30
-40
-50
-60
-70
-80

0.05

0.1

0.15

0.2
0.25
0.3
Frequency (kHz)

0.35

Result: The output is observed and the graphs are plotted.

0.4

0.45

0.5

OUTPUT:
enter the frequency of the signal: 100
enter the sampling frequency: 500

Power Spectral Density Estimate via Welch

-10
-12

Power/frequency (dB/Hz)

-14
-16
-18
-20
-22
-24
-26
-28
-30

0.05

0.1
0.15
Frequency (kHz)

Result: hence the PSD is observed.

0.2

0.25

OUTPUT:

AR system frequency response

Magnitude (dB)

40
20
0
-20

0.1

0.2

0.3
0.4
0.5
0.6
0.7
0.8
Normalized Frequency ( rad/sample)

0.9

0.1

0.2

0.3
0.4
0.5
0.6
0.7
0.8

Normalized Frequency ( rad/sample)

0.9

Phase (degrees)

100
0
-100
-200

Power Spectral Density Estimate via Yule-Walker

25

Power/frequency (dB/rad/sample)

20
15
10
5
0
-5
-10
-15
-20
-25

0.1

0.2

0.3
0.4
0.5
0.6
0.7
0.8
Normalized Frequency ( rad/sample)

Result: the PSD is calculated.

OUTPUT:

0.9

Power Spectral Density Estimate via Burg

80

psd of model output


psd estimate of x

60

one sided psd

40
20
0
-20
-40
-60
-80

0.1

0.2

0.3

0.4
0.5
0.6
normalised frequency

0.7

0.8

0.9

Result : hence the PSD is calculated using Burg method.

Result: The forward predictor of the signal is obtained.

S-ar putea să vă placă și