Professional Documents
Culture Documents
Lab Assesment 2
Lab Assesment 2
MATLAB
Hammad Arshad
210606
LAB ASSESSMENT 2
disp('B = ');
disp(B);
disp('C = ');
disp(C);
disp('D = ');
disp(D);
Result:
conic
A =
0 0 -24
1 0 -26
0 1 -9
B =
1
0
0
pg. 1
LAB ASSESSMENT 2
C =
1 -2 -2
D =
0
Command window:
pg. 2
LAB ASSESSMENT 2
G = tf(numerator, denominator);
Result:
State-Space Representation in Phase Variable Form:
A matrix:
0 0 -24
1 0 -26
0 1 -9
B matrix:
1
0
0
C matrix:
1 -2 -2
D matrix:
0
Command window:
pg. 3
LAB ASSESSMENT 2
]
LTI Form:
Code:
%lab assessment 2
%obtain State Space Representation
% Phase Variable form
clc
clear all
% Define the transfer function
numerator = [1, 7, 6];
denominator = [1, 9, 26, 24];
G = tf(numerator, denominator);
pg. 4
LAB ASSESSMENT 2
Result:
State-Space Representation (LTI form):
ss with properties:
A: [3x3 double]
B: [3x1 double]
C: [0.5000 0.8750 0.3750]
D: 0
E: []
Scaled: 0
StateName: {3x1 cell}
StatePath: {3x1 cell}
StateUnit: {3x1 cell}
InternalDelay: [0x1 double]
InputDelay: 0
OutputDelay: 0
InputName: {''}
InputUnit: {''}
InputGroup: [1x1 struct]
OutputName: {''}
OutputUnit: {''}
OutputGroup: [1x1 struct]
Notes: [0x1 string]
UserData: []
Name: ''
Ts: 0
TimeUnit: 'seconds'
SamplingGrid: [1x1 struct]
Command window:
pg. 5
LAB ASSESSMENT 2
pg. 6