15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION...
Transcript of 15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION...
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 1
Expt.
No. Name of the Experiment
PAGE
NO
PART-A
1
Magnetization characteristic of a DC shunt generator. Determination
of critical field resistance and critical speed 2-7
2 Swinburne’s Test on DC shunt machine. Predetermination of Efficiency 8-13
3
Brake Test on D.C. Shunt Motor. Determination of Performance
Curves 14-19
4 OC & SC TESTS ON SINGLE PHASE TRANSFORMER 20-25
5 LOAD TEST ON A SINGLE PHASE TRANSFORMER 26-33
PART-B
Expt.
No. Name of the Experiment
PAGE
NO
1
Generation of Various signals and Sequences (Periodic and Aperiodic),
Such as Unit Impulse, Unit Step, Square, Saw Tooth, Triangular,
Sinusoidal, Ramp, Sinc.
2-7
2
Operations on Signals and Sequences such as Addition, Multiplication,
Scaling, Shifting, Folding, Computation of Energy and Average Power. 8-13
3 Convolution between Signals and Sequences. 14-19
4 Autocorrelation and Cross correlation between Signals and Sequences. 20-25
5
Verification of Linearity and Time Invariance Properties of a Given
Continuous / Discrete System. 26-33
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 2
6
Finding the Fourier Transform of a given Signal and plotting its
Magnitude and Phase Spectrum.
7 Waveform Synthesis using Laplace Transform.
8
Generation of Gaussian Noise (Real and Complex), Computation of its
Mean, M.S.Values and its Skew, Kurtosis, and PSD, Probability
Distribution Function.
9 Sampling Theorem Verification.
10
Removal of Noise by Auto Correlation / Cross correlation in a given
signal corrupted by noise.
11 Impulse response of a raised cosine filter.
12 Checking a Random Process for Stationary in Wide Sense.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 3
ELECTRICAL
TECHNOLOGY
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 4
CIRCUIT DIAGRAM:
To find Generator Shunt field Resistance Rf:
Fig 1.2
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 5
EXPT NO: 1 DATE:
MAGNETIZATION CHARACTERISTICS OF A
DC SHUNT GENERATOR
AIM: To plot the magnetization characteristics of the given DC shunt generator and to
determine its critical field resistance and critical speed.
NAME PLATE DETAILS:
Specifications Motor Generator
Power 2.2 KW 2.2 KW
Voltage 220 V 220 V
Current 12 A 10 A
Speed 1500 Rpm 1500 Rpm
Excitation 220 V,0.95 A 220 V,0.4 A
Winding Shunt Shunt
APPARATUS:
S. No Name of the
apparatus Range Type Quantity
1 Voltmeters (0-250 )V
(0-300)V
MC
MC
1
1
2 Ammeter (0-2)A
(0-5)A
MC
MC
1
1
3 Rheostats 350/1.1A Wire Wound 2
4 SPST switch 1
5 Tachometer 1
6 Resistive Load 5 KW, 230 V 1
6 Connecting probes Required number
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 6
MODEL GRAPH:
Fig 1.3
TABULAR COLUMN:
S.No
Increasing
Field
current
IF
Generated
emf (Eg1)
S.No
Decreasing
Field
current
IF
Generated
emf
(Eg2)
Average
Generated
emf
(Eg1 +
Eg2)/2
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
N = Rated speed of
generator
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 7
PRECAUTIONS:
1. Avoid loose connections.
2. Avoid parallax error while taking the readings.
PROCEDURE:
1. Make the connections as per circuit diagram (Fig.1.1).
2. Keep the SPST switch in open position; keep the motor field rheostat at minimum
resistance position and the generator field rheostat at maximum resistance position.
3. Close the DPST switch and start the motor using 3-point starter.
4. Adjust the motor field rheostat till the rated speed of the generator is achieved.
5. Note down the residual voltage (voltmeter reading).
6. Close the SPST switch, decrease the resistance of generator field rheostat in steps till the
generator builds up to 125% of its rated voltage and note down the corresponding values
of generated e.m.f and the shunt field current.
7. Now increase the resistance of generator field rheostat in steps and note down the
generated emf for the same field currents as taken in the step 6.
8. Calculate the average of the generated emf for corresponding field currents obtained in
step 6 & 7.
9. Open the DPST switch and disconnect the circuit.
To calculate Generator Shunt field resistance Rf:
10. Connect the circuit as shown in circuit diagram (Fig.1.2)
11. Keeping the load resistance in off position switch ON 220V DC supply and close the
DPST Switch.
12. By varying the load for different values of current note down the meter readings.
13. Observing the precautions switch OFF the supply.
14. Calculate the Field Resistance in each step and take the average value of it.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 8
To calculate Generator Shunt Field Resistance:
S.No Applied Voltage
V(Volts)
Current I
(Amps)
Field winding resistance
Rf (cold) = I
V
1
2
3
4
Average value of Rf (cold) =
Rf (Hot) = 1.2 X Rf (cold) =
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 9
To determine Critical Field Resistance Rc:
15. After plotting the magnetization characteristics draw a tangent line to its initial portion,
which passes through the origin.
16. Calculate the slope of this tangent line, which gives the critical field resistance (Rc) at the
rated speed of the generator.
To determine Critical Speed Nc:
17. Draw the designed field resistance line (Rf)
18. Draw a line parallel to y-axis, which cuts the Rf line and Rc line with in the linear portion
of the magnetization characteristics.
19. Take the generated emf values corresponding to points of intersection of the line.
20. Calculate the critical speed using the formula. rated
1
C NE
E2N
SAMPLE CALCULATIONS:
From Graph
1) Critical field resistance, f
2c
I
ER
2) Critical speed, rated
1
C NE
E2N
=
RESULT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 10
CIRCUIT DIAGRAMS:
Fig 2.1
To find Armature Resistance Ra:
Fig 2.2
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 11
EXPT NO: 2 DATE:
SWINBURNE’S TEST ON A DC SHUNT MACHINE
AIM: To conduct the Swinburne’s test on the given DC shunt machine and to pre-determine its
efficiency at various loads when it runs as (a) motor (b) generator.
NAME PLATE DETAILS:
Specifications Motor
Power 3.5 KW
Voltage 220 V
Current 18.5 A
Speed 1500 Rpm
Excitation 220V / 0.9A
APPARATUS REQUIRED:
S. No Name of the
apparatus Range Type Quantity
1 Voltmeters (0-300 )V
(0-50)V
MC
MC
1
1
2 Ammeters (0-2) A
(0-5)A
MC
MC
1
1
3 Rheostat 350/1.1A Wire wound 1
4 Tachometer 1
5 Connecting probes Required number
PRECAUTIONS:
1. Avoid loose connections.
2. Avoid parallax error while taking the readings.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 12
TABULAR COLUMN:
S.No
No-Load
Current
IL0
(Amp)
Field
Current
Ish
(Amp)
Terminal
Voltage
VL
(volt)
No-Load
Armature
Current
Iao =ILo- Ish
(Amp)
Armature
Cu loss
Iao2Ra(cold)
(watt)
No-load
Input
VL x ILo
(Watt)
Constant
Losses(WC) =
Input – Cu.
Loss
(Watt)
1
When the machine runs as a Motor:
S.No
Load
current
IL
(Amp)
Field
Current
If
(Amp)
Armature
current
Ia = IL- Ish
(Amp)
Armature
Cu loss
Ia2Ra(hot)
(watt)
Total
losses
WC+
Ia2Ra2
(watt)
Input
=
VL x
IL
(watt)
Output
=
Input –
losses
(watt)
=
100Input
Output
(%)
1
2
3
4
5
6
When the machine runs as a Generator:
S.No
Load
current
IL
(Amp)
Field
Current
If
(Amp)
Armature
current
Ia = IL+
Ish
(Amp)
Armature
Cu loss
Ia2Ra(hot)
(watt)
Total
losses
WC+
Ia2Ra2
(watt)
Output
=
VL x IL
(watt)
Input
=outp
ut
+losses
(watt)
=
100Input
Output
(%)
1
2
3
4
5
6
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 13
PROCEDURE:
1. Make the connections as per the circuit diagram (Fig 2.1).
2. Initially close the SPST switch.
3. Close the DPST switch and start the motor using the 3-point starter.
4. Set the motor speed to its rated value by adjusting the field rheostat .
5. Note down the no load motor current ILo, shunt field current Ish and terminal voltage (VL).
6. Open the DPST switch and disconnect the circuit.
To calculate Armature Resistance:
7. Connect the circuit as shown in circuit diagram (Fig 2.2)
8. Keeping the load resistance in off position switch ON 220V DC supply and close the DPST
Switch.
9. By varying the load for different values of current note down the meter readings.
10. Observing the precautions switch OFF the supply.
11. Calculate the Armature Resistance in each step and take the average value of it.
SAMPLE CALCULATIONS:
When the machine runs as a Motor:
To find Constant losses:
Terminal voltage (VL) =
No load current (ILO) =
Field current Ish =
No-Load armature current, Iao =ILO- Ish =
Armature resistance Ra(cold) =
No-load Armature Cu loss, Iao2Ra(cold ) =
No-load Input (PO) = VL x ILo =
Constant losses (WC) = PO – No-load Armature Cu loss =
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 14
To calculate Armature Resistance Ra:
S.No
Applied
Voltage
V(Volt)
Current
I
(Amp)
Armature resistance
Ra= I
V
1
2
3
4
Average value of Ra (cold) =
Ra(hot) = 1.2 x Ra (cold) =
EXPECTED GRAPH:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 15
To determine Motor Efficiency:
Input voltage (VL) =
Load current (IL) =
Field current (If) =
Armature current (Ia=IL - If) =
Armature resistance Ra(hot) =
Armature copper loss=Ia2Ra(hot) =
Input = VLIL =
Total Losses = WC + Armature copper loss =
Output= Input –losses =
% Efficiency = 100Input
Output =
To determine Generator Efficiency:
Input voltage (VL) =
Load current (IL) =
Field current (If) =
Armature current (Ia=IL - If) =
Armature resistance Ra(hot) =
Armature copper loss=Ia2Ra(hot) =
Output = VLIL =
Total Losses = WC + Armature copper loss =
Input= Output + losses=
% Efficiency = 100Input
Output =
RESULT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 16
CIRCUIT DIAGRAM:
Fig.3.1
MODEL GRAPH:
Fig 3.2
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 17
EXPT NO: 3 DATE:
BRAKE TEST ON DC SHUNT MOTOR
AIM: To obtain the performance curves of the DC shunt motor by conducting brake test.
NAME PLATE DETAILS:
Specification Motor
Power 3.5 KW
Voltage 220 V
Current 18.5 A
Speed 1500 Rpm
Excitation 220 V, 0.95A
Winding Shunt
EQUIPMENT REQUIRED:
S.No Name of the
apparatus Range Type Quantity
1 Voltmeter (0-300 )V MC 1
2 Ammeter (0-20) A MC 1
3 Rheostat 350/1.1A Wire Wound 1
4 Tachometer 1
5 Connecting
probes
Required
number
PRECAUTIONS:
1. Avoid loose connections.
2. Avoid parallax error while taking the readings.
3. Before starting the motor, ensure that brake drum is filled with water and it is free
from mechanical load.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 18
TABULAR COLUMN:
Radius of the brake drum(r) =
S.
No
Input
voltage
(Volt)
Current
(I)
(Amp)
Spring
balance
S=
S1~
S2
kg
Speed
(N)
rpm
Torque
(T)
rS9.81
N-m
Output
60
NT2π
(Watt)
Input
V I
(Watt)
%
Efficiency
Input
Output
*100
S1
( kg )
S2
( kg )
1
2
3
4
5
6
7
8
SAMPLE CALCULATIOS:
Input voltage (V) =
Line Current (I) =
Spring balance reading (S1) =
Spring balance reading (S2) =
Radius of the brake drum(r) =
Torque (T)= rSS )~(81.9 21 =
Speed of the motor (N) =
Output power =60
NT2π=
Input power = IV =
%Efficiency = 100Input
Output =
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 19
PROCEDURE:
1. Make the connections as per the circuit diagram.
2. Initially keep the field rheostat in minimum resistance position and keep the SPST switch in closed
position.
3. Close the DPST switch and start the motor with the help of 3-point starter.
4. Open the SPST switch and gradually apply the load on the motor up to the rated value and note
down corresponding supply voltage, line current, speed and spring readings.
5. Gradually reduce the load to zero, and then open the DPST switch to disconnect the circuit.
RESULT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 20
CIRCUIT DIAGRAM :-
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 21
EXPT NO: 4 DATE:
OC & SC TESTS ON SINGLE PHASE TRANSFORMER
AIM: -
1. To determine the efficiency and regulation of the given single phase transformer by
conducting open circuit and short circuit test on the given single phase transformer.
2. To determine the equivalent circuit of a given single phase transformer.
NAME PLATE DETAILS:-
S.NO SPECIFICATION RANGE
1 Transformer Rating 2 KVA
2 LV Side Voltage 115 V
3 HV Side Voltage 230 V
4 LV Side Current 17.39 A
5 HV Side Current 8.69 A
6 Frequency 50 HZ
APPARATUS REQUIRED:-
S.No. NAME OF THE APPARATUS RANGE TYPE QUANTITY
1. Auto traonsformer (1 ) 230/(0-270)V 1
2. Ammeter (0-2)A
(0-10)A MI
1
1
3. Voltmeter (0-150)V
(0-75)V MI
1
1
4. Wattmeter 150V,2A,LPF
75V,10A,UPF
DYNAMO
METER
1
1
5. Connecting wires 1 set
PROCEDURE:-
OPEN CIRCUIT TEST:
1. Connections are made as per the circuit diagram.
2. Close the DPST switch after the verification of connections.
3. Gradually increase the input voltage to the single – phase transformer by using auto
transformer to get the rated secondary voltage of single – phase transformer.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 22
TABULAR COLUMN:-
OPEN CIRCUIT:
S. No
Open circuit
voltage in Volts
(V0)
Open circuit
Current in
Amps
(I0)
Watt meter
reading in
watts
Observed
Multiplication
Factor
Total power
in Watts
(Wo)
SHORT CIRCUIT:
S.No
Short circuit
voltage in Volts
(VSc)
Short circuit
Current in
Amps
(ISc)
Watt meter
reading in
watts
Observed
Multiplication
Factor
Total power
in Watts
(WSC)
CALCULATION OF EFFICIENCY:
S.NO POWER
FACTOR
PERCENTAGE EFFICIENCY
¼ LOAD ½ LOAD ¾ LOAD FULL LOAD
1 0.2
2 0.4
3 0.6
4 0.8
5 1
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 23
4. Note down the corresponding readings of all the meters connected in the circuit.
5. Now open the DPST switch after gradually reducing the auto transformer’s secondary
voltage to a minimum value.
SHORT CIRCUIT TEST:
1. Connections are made as per the circuit diagram.
2. Close the DPST switch after the verification of connections.
3. Gradually increase the input voltage to the single – phase transformer by using auro
transformer to ger the rated secondary current of single – phase transfomer.
4. Note down the corresponding readings of all the meters connected in the circuit.
5. Now open the DPST switch after gradually reducing the auto transformer’s secondary
voltage to a minimum value.
PRECAUTION:-
1. DPST switch should be kept open.
2. The Auto Transformer should be kept in Minimum Position.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 24
CALCULATION OF REGULATION:
S.
N
O
POWER
FACTOR
PERCENTAGE EFFICIENCY
REGULATION AT ¼
LOAD
REGULATION AT ½
LOAD
REGULATION AT
¾ LOAD
REGULATION AT
FULL LOAD
LAGGING LEADING LAGGING LEADING LAGGING LEADING LAGGING LEADING
1 0.2
2 0.4
3 0.6
4 0.8
5 1
EQUIVALENT CIRCUIT:-
Model Graph:
Z1
R01
X0
X01
R0
V1
I1
IN
IM
Out put power in Watts
% Regulation
Power Factor
Lagging
Leading
UPF
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 25
Formulae:
1. Transformation ratio (K) = Vs/Vp =
2. W0 = V0* I0* cos 0 =
3. Iw =I0* cos 0 =
4. Iµ =I0* sin 0 =
5. cos 0 = W0/V0*I0 =
6. sin0 =√(1-cos2 0 =
7. R0=V1/Iw =
8. X0=V1 / Iµ =
9. Ro1 = Wsc/ (Isc)2 in Ohms=
10. X01 = √(Zo1)2 – (R01)
2 in Ohms=
11. Z01 = vsc/ISC(Primary) in Ohms=
12. R02 = K2 . R01 in Ohms=
13. X02 = K2 . X01 in Ohms=
14. Z02 = K2 . Z01 in Ohms=
15. Copper loss = Is2 . R2 Watts=
16. Total loss = Core loss + X2 * Copper loss =
17. Output power = X * Vs * Is * Cos =
18. Input power = Output power + Total losses =
19. % Efficiency = ( Output power / Input power)* 100 =
20. % Regulation at UPF = [(Is * R02) / Vs (rated)] *100 =
21. % Regulation at lagging PF = [ X * Is * (R02 * Cos + X02 Sin) / Vs] * 100
22. % Regulation at leading PF = [X * Is * (R02 * Cos - X02 Sin) / Vs] * 100
RESULT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 26
CIRCUIT DIAGRAM:-
EXPECTED GRAPH:-
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 27
EXPT NO: 5 DATE:
LOAD TEST ON A SINGLE PHASE TRANSFORMER
AIM:-
To determine the efficiency and voltage regulation of a given transformer by conducting
load test on it, using resistive load.
NAME PLATE DETAILS:-
PARAMETER PRIMARY SECONDARY
Power 2 KVA 2 KVA
Voltage 115 V 230 V
Current 17.39 A 8.69 A
APPARATUS REQUIRED:-
EQUIPMENT RANGE TYPE QUANTITY
Ammeter 0 –20 A MI 2 NO’s
Voltmeter 0-300 V MI 1 NO
Voltmeter 0-150 V MI 1 NO
Wattmeters 300 V,20A, UPF DYNAMOMETER 1 NO
Resistive load 5 KW, 20 A --- 1 NO
PROCEDURE:-
1. Connect the circuit as per the diagram and with the load switched off, apply rated voltage to
the primary of the transformer.
2. Note down the readings of the Wattmeter, voltmeter on the secondary side (0V2) in the table
for zero load current.
3. Switch on the load and increase the load in steps and at each step, record the voltage,V2, the
load current, I2 and the input power, Wi in the table.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 28
TABULAR COLUMN:-
S.NO
Primary
Voltage
V1(volts)
Primary
Current
I1(Amps)
Input
Power
W1(watts)
Secondary
Voltage
V2(volts)
Secondary
Current
I2(Amps)
O/P Power
=
V2I2(Watts)
%Efficiency
= (Output /
Input)100
%Regulation =
[(0V2-V2) / V2] 100
1
2
3
4
5
6
7
8
9
10
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 29
4. For each set of readings, calculate output powerW0 and hence efficiency and voltage
regulation.
5. Plot the graphs, load versus efficiency and load versus voltage regulation.
6. Find the maximum efficiency of the given transformer and voltage regulation of the
transformer at its full load.
PRECAUTIONS:
1. Care is taken such that there are no loose connections.
2. Readings are noted down without parallax error.
SAMPLE CALCULATIONS:
1. Primary Voltage V1 =
2. Primary Current I1 =
3. Input Power W1 =
4. Secondary Voltage V2 =
5. Secondary Current I2 =
6. Output Power = W2 = V2*I2 =
7. % Efficiency = (Output Power / Input Power) * 100
= (W2 / W1) * 100 =
RESULT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 30
BASIC
SIMULATION
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 31
EXPT NO: 1 DATE:
GENERATION OF SIGNALS & SEQUENCES
1. GENERATION OF DISCRETE SIGNALS
AIM: To write a “MATLAB” Program to generate discrete time signals and analog time
signals like unit impulse, unit step, unit ramp, sawtooth, exponential signal and sinusoidal
signals.
SOFTWARE REQURIED :
ATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM:
clc;
clear all;
close all;
n=-10:1:10;
L=length(n);
for i=1:L
if n(i)==0
x1(i)=1;
else
x1(i)=0;
end;
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 32
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 33
if n(i)>=0
x2(i)=1;
x3(i)=n(i);
else
x2(i)=0;
x3(i)=0;
end;
end;
% to generate exponential sequence
a=0.85;
x4=a.^n;
% to generate sinusoidal sequence
f=0.1;
x5=sin(2*pi*f*n);
figure;
subplot(3,2,1);
stem(n,x1);
xlabel('time n ---->');
ylabel('amplitude---->');
title('Unit step signal');
subplot(3,2,2);
stem(n,x2);xlabel('time n ---->');
ylabel('amplitude---->');
title('Unit impluse signal')
subplot(3,2,3);
stem(n,x3);
xlabel('time n ---->');
ylabel('amplitude---->');
title('Unit remp signal');
subplot(3,2,4);
stem(n,x4);xlabel('time n ---->');
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 34
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 35
ylabel('amplitude---->');
title('exponential signal');
subplot(3,2,[5,6]);
stem(n,x5);
xlabel('time n ---->');
ylabel('amplitude---->');
title('sinusoidal signal');
RESULT:
Thus the Generation of discrete time signals like unit impulse, unit step, unit ramp,
exponential signal and sinusoidal signals was successfully Completed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 36
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 37
2. GENERATION OF CONTINUOUS SIGNALS
PROGRAM:
clc;
Clear all;
Close all;
t=-10:0.01:10;
L=length(t);
for i=1:L
%to generate unit Step and ramp function
if t(i)<0
x1(i)=0;
x2(i)=0;
else
x1(i)=1;
x2(i)=t(i);
end;
end;
%to generate sinusoidal function
f=0.1;
x3=sin(2*pi*f*t);
%to generate Triangular and Sawtooth waveforms
x4=sawtooth(t,0.5);
x5=sawtooth(t);
%to generate sinc function
x6=sinc(t);
figure;
subplot(2,3,1);
plot(t,x1);
xlabel('t--->');ylabel('amp--->');
title('unit step');
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 38
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 39
subplot(2,3,2);
plot(t,x2);
xlabel('t--->');ylabel('amp--->');
title('unit ramp');
subplot(2,3,3);
plot(t,x3);
xlabel('t--->');ylabel('amp--->');
title('sinusoidal');
subplot(2,3,4);
plot(t,x4);
xlabel('t--->');ylabel('amp--->');
title('triangular');
subplot(2,3,5);
plot(t,x5);
xlabel('t--->');ylabel('amp--->');
title('sawtooth');
subplot(2,3,6);
plot(t,x6);
xlabel('t--->');ylabel('amp--->');
title('sinc function');
RESULT:
Thus the Generation of continuous time signals like unit step, sawtooth, triangular,
sinusoidal, ramp and sinc functions are successfully completed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 40
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 41
EXPT NO: 2 DATE:
OPERATIONS ON SIGNALS AND SEQUENCES
AIM: To perform various operations on signals such as addition, multiplication,
scaling, shifting and folding, computation of energy and avg power using MATLAB
program.
SOFTWARE REQURIED : MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM: clc,
close all;
clear all;
t=0:0.001:1;
L=length(t);
f1=1;
f2=3;
x1=sin(2*pi*f1*t);
x2=sin(2*pi*f2*t);
figure;
subplot(3,2,1);
plot(t,x1,'b',t,x2,'r');
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 42
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 43
title('the signals x1(t) and x2(t)');
x3=x1+x2;
subplot(3,2,2);
plot(t,x3);
title('the sum of x1(t) and x2(t)');
x4=x1.*x2;
subplot(3,2,3);
plot(t,x4);
title('the multiplication of x1(t) and x2(t)');
t=-1:0.001:0;
x5=sin(2*pi*f1*(-t));
x6=sin(2*pi*f2*(-t));
subplot(3,2,4);
plot(t,x5,'b',t,x6,'r');
title('the folding of x1(t)and x2(t)');
x7=[zeros(1,200),x2(1:(L-200))];
subplot(3,2,5);
plot(t,x7);
title('the shifting of x1(t)and x2(t)');
x8=x2.^2;
subplot(3,2,6);
plot(t,x8);
title('the squaring of x1(t)and x2(t)');
RESULT:
Thus the MATLAB Program to perform some operations on signals was completed
successfully.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 44
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 45
EXPT NO: 3 DATE:
CONVOLUTION OF TWO SEQUENCES
AIM: To write a MATLAB program to find the convolution of two sequences.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM:
clc;
clear all;
close all;
n=0:8;
x1=1;
x2=0;
y1=x1.*(n>=0 & n<=2)+x2.*(n>=2 & n<=8);
subplot(2,2,1);
stem(n,y1);
axis([0 8 0 1.5]);
xlabel('time n ---->');
ylabel('amplitude---->');
title('the sequence y1[n]')
y2=x1.*(n>=0 & n<=4)+x2.*(n>=4 & n<=8);
subplot(2,2,2);
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 46
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 47
stem(n,y2);
axis([0 8 0 1.5]);
xlabel('time n ---->');
ylabel('amplitude---->');
title('the sequence y2[n]')
y=conv(y1,y2);
L=length(y);
n=0:L-1;
subplot(2,2,[3,4]);
stem(n,y);
axis([0 10 0 4]);
xlabel('time n ---->');
ylabel('amplitude---->');
title('the convolution sequence of y1[n]&y2[n]');
RESULT:
Thus the MATLAB Program to finding the convolution of two sequences is completed
successfully.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 48
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 49
EXPT NO: 4 DATE:
AUTO-CORRELATION & CROSS-CORRELATION
BETWEEN SIGNALS
AIM: To write a matlab program to compute autocorrelation and cross correlation
between signals.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM: clc; clear all; close all;
t=0:0.01:1;
f1=3;
x1=sin(2*pi*f1*t);
figure;
subplot(2,1,1);
plot(t,x1);
title('sine wave');
xlabel('time ---->');
ylabel('amplitude---->');
grid;
[rxx lag1]=xcorr(x1);
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 50
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 51
subplot(2,1,2);
plot(lag1,rxx);
grid;
title('auto-correlation function of sine wave');
figure;
subplot(2,2,1);
plot(t,x1);
title('sine wave x1');
xlabel('time ---->');
ylabel('amplitude---->');
grid;
f2=2;
x2=sin(2*pi*f2*t);
subplot(2,2,2);
plot(t,x2);
title('sine wave x2');
xlabel('time ---->');,ylabel('amplitude---->');
grid;
[cxx lag2]=xcorr(x1,x2);
subplot(2,2,[3,4]);
plot(lag2,cxx);
grid;
title('cross-correlation function of sine wave');
RESULT:
Thus the MATLAB Program of computing auto correlation and cross correlation
between signals was completed successfully.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 52
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 53
EXPT NO: 5 DATE:
LINEAR SYSTEM OR NON-LINEAR SYSTEM
AIM: To write a matlab program to verify the given system is linear or non-linear.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM: clc; clear all; close all;
x1=input('enter the x1[n] sequence='); % [0 2 4 6]
x2=input('enter the x2[n] sequence='); % [3 5 -2 -5]
if length(x1)~=length(x2)
disp(' length of x2 must be equal to the length of x1');
return;
end;
h=input('enter the h[n] sequence=');% [-1 0 -3 -1 2 1]
a=input('enter the constant a= '); % 2
b=input('enter the constant b= '); % 3
y01=conv(a*x1,h);
y02=conv(b*x2,h);
y1=y01+y02;
x=a*x1+b*x2;
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 54
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 55
y2=conv(x,h);
L=length(x1)+length(h)-1;
n=0:L-1;
subplot(2,1,1);
stem(n,y1);
label('n --->'); label('amp ---->');
title('sum of the individual response');
subplot(2,1,2);
stem(n,y2);
xlabel('n --->'); ylabel('amp ---->');
title('total response');
if y1==y2
disp('the system is a Linear system');
else
disp('the system is a non-linear system');
end;
INPUT SEQUENCE:
Enter the x1[n] sequence= [0 2 4 6]
Enter the x2[n] sequence= [3 5 -2 -5]
Enter the h[n] sequence= [-1 0 -3 -1 2 1]
Enter the constant a= 2 & enter the constant b= 3
The system is a linear system
RESULT: Thus the MATLAB Program of verifying the system is linear or non linear by
using matlab has performed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 56
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 57
TIME-INVARIANT OR TIME-VARIANT SYSTEM
AIM: To write a matlab program to verify the given system is Time –invariant or Time–
variant.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM:
clc; clear all; close all;
x=input('enter the sequence x[n]='); %[0 2 3 1 -2 7 3]
h=input('enter the sequence h[n]='); %[4 -5 -11 -3 7 2 6 8 -15]
d=input('enter the positive number for delay d='); % 5
xdn=[zeros(1,d),x]; % delayed input
yn=conv(xdn,h); % output for delayed input
y=conv(x,h); % actual output
ydn=[zeros(1,d),y]; % delayed output
figure;
subplot(2,1,1);
stem(0:length(x)-1,x);
xlabel('n ---->'),ylabel('amp --->');
title('the sequence x[n] ');
subplot(2,1,2);
stem(0:length(xdn)-1,xdn);
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 58
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 59
xlabel('n ---->'),ylabel('amp --->');
title('the delayed sequence of x[n] ');
figure;
subplot(2,1,1);
stem(0:length(yn)-1,yn);
xlabel('n ---->'),ylabel('amp --->');
title('the response of the system to the delayed sequence of x[n] ');
subplot(2,1,2);
stem(0:length(ydn)-1,ydn);
xlabel('n ---->'),ylabel('amp --->');
title('the delayed output sequence ');
if yn==ydn
disp('the given system is a Time-invarient system');
else
disp('the given system is a Time-varient system');
end;
INPUT SEQUENCE: Enter the sequence x[n] = [0 2 3 1 -2 7 3]
Enter the sequence h[n] = [4 -5 -11 -3 7 2 6 8 -15]
Enter the positive number for delay d=5
The given system is a Time-invariant system
RESULT:
Thus the MATLAB Program of verifying the system is Time –invariant or Time–variant
System by using matlab has performed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 60
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 61
EXPT NO: 6 DATE:
FOURIER TRANSFORMS AND INVERSE FOURIER
TRANSFORMS AIM: To find Fourier transform and inverse Fourier transforms of given functions.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM:
To find Fourier transform
clc; clear all; close all;
syms t s;syms w real;
syms A real;syms o real;syms b float;
f=dirac(t);
F=fourier(f);
disp('the fourier transform of dirac(t) =');
disp(F);
f1=A*heaviside(t);
F1=fourier(f1);
disp('the fourier transform of A =');
disp(F1);
f2=A*exp(-t)*heaviside(t);
F2=fourier(f2);
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 62
OUTPUT:
the fourier transform of dirac(t) =1
the fourier transform of A =A*(pi*dirac(w)-i/w)
the fourier transform of exp(-t) =
A/(1+i*w)
the fourier transform of A*t*exp(-b*t)*u(t) =
A/(b+i*w)^2
the fourier transform of sin(o*t) =
i*pi*(dirac(w+o)-dirac(w-o))
the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)=
A*cos(o*t)
the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)/i=
A*sin(o*t)
the inverse fourier transform of A/(1+jw)=
A*exp(-t)*heaviside(t)
the inverse fourier transform of (3*i*w+14)/((i*w)^2+7*i*w+12)=
heaviside(t)*(-2*exp(-4*t)+5*exp(-3*t))
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 63
disp('the fourier transform of exp(-t) =');
disp(F2);
f3=A*t*exp(-b*t)*heaviside(t);
F3=fourier(f3);
disp('the fourier transform of A*t*exp(-b*t)*u(t) =');
disp(F3);
f4=sin(o*t);
F4=fourier(f4);
disp('the fourier transform of sin(o*t) =');
disp(F4);
To find inverse Fourier transforms of Given functions.
F1=A*pi*(dirac(w-o)+dirac(w+o));
f1=ifourier(F1,t);
disp('the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)=');
disp(f1);
F2=A*pi*(dirac(w-o)-dirac(w+o))/i;
f2=ifourier(F2,t);
disp('the inverse fourier transform of A*pi*(dirac(w-o)+dirac(w+o)/i=');
disp(f2);
F3=A/(1+i*w);
f3=ifourier(F3,t);
disp('the inverse fourier transform of A/(1+jw)=');
disp(f3);
F4=(3*i*w+14)/((i*w)^2+7*i*w+12);
f4=ifourier(F4,t);
disp('the inverse fourier transform of (3*i*w+14)/((i*w)^2+7*i*w+12)=');
disp(f4);
RESULT: Thus the MATLAB program to find fouries transform and inverse fouries
transform of given functions is successfully completed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 64
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 65
MAGNITUDE AND PHASE SPECTRUM OF FOURIER TRANSFORMS
AIM: To find Fourier transform of the given signal and to plot its magnitude and
phase spectrum.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB
• Open new M-file
• Type the program
• Save in current directory
• Compile and Run the program
• For the output see command windowFigure window
PROGRAM:
clc; clear all; close all;
syms t s ;
syms w float;
f=3*exp(-t)*heaviside(t); % given function
F=fourier(f); % to find Fourier Transform
disp('the fourier transform of 3*exp(-t)*u(t) =');
disp(F); % to display the result in the command window
w=-2*pi:pi/50:2*pi;
F1=subs(F,w); % substitute w in F function
Fmag=abs(F1); % to find magnitude
Fphas=angle(F1); % to find phase
subplot(2,1,1);
plot(w,Fmag);
xlabel('w ---->');
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 66
OUTPUT:
The fourier transform of 3*exp (-t)*u (t) = 3/(1+i*w)
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 67
ylabel('Magnitude --->');
title('Magnitude spectrum');
grid;
subplot(2,1,2);
plot(w,Fphas);
xlabel('w ---->');
ylabel('Phase in radians--->');
title('Phase spectrum');
grid;
RESULT: Thus the MATLAB program to find fouries transform and ploting magnitude
and Phase spectrums is successfully completed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 68
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 69
EXPT NO: 7 DATE:
LAPLACE TRANSFORM
AIM: MATLAB program to plot the given waveform using waveform synthesis using
Laplace transform.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB Software
• Open new M-file
• Type the program
• Save in current directory
• Run the program
• For the output see command windowFigure window
PROGRAM:
clc;
close all;
syms s;
F =(1/(s^2))*(1-exp(-s)-(1/2)*exp(-3*s)+(1/2)*exp(-5*s));
f=ilaplace(F);
pretty(simplify(f))
ezplot(f,[0,5]);
grid;
RESULT: Thus the MATLAB program the given waveform is plotted by using wave
form synthesis is successfully completed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 70
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 71
EXPT NO: 8 DATE:
GAUSSIAN NOISE
AIM: To generate a Gaussian noise and to compute its Mean, Mean Square Value,
Skew, Kurtosis, PSD, Probability Distribution function.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB Software
• Open new M-file
• Type the program
• Save in current directory
• Run the program
• For the output see command windowFigure window
PROGRAM:
clc; clear all; close all;
t=-10:0.01:10;
L=length(t);
n=randn(1,L);
subplot(2,1,1);
plot(t,n);
xlabel('t --->'),ylabel('amp ---->');
title('normal randon function');
nmean=mean(n);
disp('mean=');disp(nmean);
nmeansquare=sum(n.^2)/length(n);
disp('mean square=');disp(nmeansquare);
nstd=std(n);
disp('std=');disp(nstd);
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 72
OUTPUT:
Mean= 9.2676e-004
Mean square= 0.9775
STD= 0.9889
Var= 0.9780
Skew= -0.0091
Kurt= 2.9520
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 73
nvar=var(n);
disp('var=');disp(nvar);
nskew=skewness(n);
disp('skew=');disp(nskew);
nkurt=kurtosis(n);
disp('kurt=');disp(nkurt);
p=normpdf(n,nmean,nstd);
subplot(2,1,2);
stem(n,p)
RESULTS: Thus To generate Gaussian noise and to compute its Mean, Mean Square Value,
Skew, Kurtosis, PSD, Probability Distribution function is performed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 74
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 75
EXPT NO: 9 DATE:
SAMPLING THEOREM
AIM: To generate a MATLAB Program to verify sampling theorem.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB Software
• Open new M-file
• Type the program
• Save in current directory
• Run the program
• For the output see command windowFigure window
PROGRAM:
clc;
close all;
clear all;
f1=3;
f2=23;
t=-0.4:0.0001:0.4;
x=cos(2*pi*f1*t)+cos(2*pi*f2*t);
figure(1);
plot(t,x,'-.r');
xlabel('time-----');
ylabel('amp---');
title('The original signal');
%case 1: (fs<2fm)
fs1=1.4*f2;
ts1=1/fs1;
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 76
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 77
n1=-0.4:ts1:0.4;
xs1=cos(2*pi*f1*n1)+cos(2*pi*f2*n1);
figure(2);
stem(n1,xs1);
hold on;
plot(t,x,'-.r');
hold off;
legend('fs<2fm');
%case 2: (fs=2fm)
fs2=2*f2;
ts2=1/fs2;
n2=-0.4:ts2:0.4;
xs2=cos(2*pi*f1*n2)+cos(2*pi*f2*n2);
figure(3);
stem(n2,xs2);
hold on;
plot(t,x,'-.r');
hold off;
legend('fs=2fm');
%case 3: (fs>2fm)
fs3=7*f2;
ts3=1/fs3;
n3=-0.4:ts3:0.4;
xs3=cos(2*pi*f1*n3)+cos(2*pi*f2*n3);
figure(4);
stem(n3,xs3);
hold on;
plot(t,x,'-.r');
hold off;
legend('fs>2fm');
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 78
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 79
RESULTS:
Thus the MATLAB program to verify Sampling theorem is performed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 80
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 81
EXPT NO: 10 DATE:
REMOVAL OF NOISE BYAUTO-CORRELATION/CROSS-
CORRELATION
AIM: To write a program to detect the periodic signal by Noise using Auto correlation
and Cross Correlation method.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB Software
• Open new M-file
• Type the program
• Save in current directory
• Run the program
• For the output see command windowFigure window.
PROGRAM:
clc;
clear all;
close all;
t=0:0.01:10;
s=cos(2*pi*3*t)+sin(2*pi*5*t); % periodic signal
figure;
subplot(2,1,1);
plot(t,s);
axis([0 10 -2 2]);
xlabel(' t ---->'),ylabel(' amp ----> ');
title('the periodic signal');
L=length(t);
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 82
OUTPUT:
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 83
n=randn(1,L); % noise signal
subplot(2,1,2);
plot(t,n);
xlabel(' t ---->'),ylabel(' amp ----> ');
title('the noise signal');
L=length(t);
f=s+n; % received signal
figure;
subplot(2,1,1);
plot(t,f);
xlabel(' t ---->'),ylabel(' amp ----> ');
title('the received signal');
rxx=xcorr(f,s,200);
subplot(2,1,2);
plot(rxx);
title('the Correlator output');
RESULTS: Thus the MATLAB Program to detect the periodic signal masked by noise
using Auto Correlation &Cross Correlation method is performed.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 84
OUTPUT: enter Fd the sampling frequency of digital i/p signal:1
The ratio Fs/Fd must be a positive integer greater than 1
enter Fs the sampling frequency for the filter:4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
-120
-100
-80
-60
-40
-20
0
20
Magnitude
(
dB)
Magnitude Response (dB)
Normalized Frequency (.. rad/sample)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
-1200
-1000
-800
-600
-400
-200
0
Phase
(
degrees)
Phase Response
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 85
EXPT NO: 11 DATE:
IMPULSE RESPONSE OF RAISED COSINE FILTER
AIM: To Design an FIR Raised Cosine Filter and to plot its Magnitude, Phase and
Impulse responses using MATLAB.
SOFTWARE REQURIED :
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB Software
• Open new M-file
• Type the program
• Save in current directory
• Run the program
• For the output see command windowFigure window
PROGRAM:
Fd=input('enter Fd the sampling frequency of digital i/p signal:');
disp('The ratio Fs/Fd must be a positive integer greater than 1');
% Define filter-related parameters.
Fs=input('enter Fs the sampling frequency for the filter:');
filtorder = 40; % Filter order
delay = filtorder/(Fs*2); % Group delay (# of input samples)
rolloff = 0.25; % Rolloff factor of filter
rcfilter = rcosine(Fd,Fs,'fir',rolloff,delay);
H=tf(rcfilter)
% Plot impulse response.
%figure; impz(rcfilter,1)
fvtool(rcfilter)
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 86
Normalized Frequency (.. rad/sample)
Impulse Response
Amplitude
1.2
1
0.8
0.6
0.4
0.2
0
-0.2
0 5 1015 20253035 40
Samples
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 87
RESULT: The Impulse Response of a Raised Cosine Filter was plotted using fvtool in
MATLAB.
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 88
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 89
EXPT NO: 12 DATE:
WSS OF A RANDOM PROCESS
AIM: To generate a Random process and to check for its Wide Sense Stationary using
MATLAB
SOFTWARE REQURIED :-
MATLAB R2006 b (7.3 Versions)
PROCEDURE:
• Open MATLAB Software
• Open new M-file
• Type the program
• Save in current directory
• Run the program
• For the output see command windowFigure window
PROGRAM:
clc;
clear all;
close all;
syms pi a wo t t1 t2 theta
l=input('Enter the lower limit');
u=input('Enter the upper limit');
x=input('Enter the PDF');
f=a*cos((wo*t)+theta);
f1=f*x;
y1=int(f1,theta,l,u);
disp('The Expectation is:');
disp(y1);
f2=a*cos((wo*t1)+theta);
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 90
OUTPUT:
Enter the lower limit0
Enter the upper limit2*pi
Enter the PDF1/(2*pi)
The Expectation is: 0
The AutoCorrelation is:
1/2*a^2*(cos(wo*t1)*cos(wo*t2)+sin(wo*t1)*sin(wo*t2))
15A02307 ELECTRICAL TECHNOLOGY AND BASIC SIMULATION LAB
SIETK , EEE Page 91
f3=a*cos((wo*t2)+theta);
f4=f2*f3*x;
y2=int(f4,theta,l,u);
disp('The AutoCorrelation is:');
disp(y2);
Manual Calculation
1) Consider the random process X(t)=Acos(.0t+T) Where “T” is real-valued random
variable and is uniformly distributed over [0, p]. Check if the process is wide sense
stationary.
2) Consider the random process X(t)=A cos(.0t+T) Where “T” is real-valued random
variable and is uniformly distributed over [0, 2p]. Check if the process is wide sense
stationary.
RESULT: Thus the given random processes are identified whether they are WSS or
not through calculating the mean and autocorrelation functions manually and verified
these results through MATLAB simulation.