In: Advanced Math
Solve in Matlab please. An ltic system is specified by the eq: (D^2+4D+4) y(t) = Dx(t)
a) Find the characteristic polynomial, char. equation, char. roots, and char. modes.
b) find y0(t), zero-input component of the response y(t) for t>=o; if initial conditions is y0(0-)=3 and y'0(0-) = 4
I am pasting here the matlab code that I wrote in my matlab software.
It is quiet easy to undersatnd and many a place there are comments that make it even easier to understand. you can check the results by running it.
code starts here
% represent the differential quation
syms y(t) x(t);
ode = diff(y,t,2) + 4*diff(y,t) + 4*y(t)...
    == diff(x,t);
% coefficients of the system
den = [1 4 4];
num = [1];
transfer_function = tf(num, den); %
(       1
                                   
%   -------------
                                   
%   s^2 + 4 s + 4) )
char_polynomial = poly2sym(den,s); % (s^2 + 4*s + 4)
char_eqn = char_polynomial == 0;   %   s^2 +
4*s + 4 == 0
char_roots = solve(char_eqn);     
%    [-2, -2]
char_roots = double(char_roots);
syms t;    % defining a symbols t to be treated as
time
char_modes = zeros(1,length(char_roots))
for i = 1:length(char_roots)
     char_modes(i) = exp(char_roots(i))
end
char_modes = char_modes.^t; % chararcteristic modes e^rt
%% ZIR
% initial condition
syms y
y_0 = 3;        % y at 0
y_diff_0 = 4;   % y differentiated at 0
% at zero input x(t) = 0 always
% we will have a new transfer function
ZIR_TF = solve(den(1)*(s^2*y - s*y_0 - y_diff_0) + den(2)*(s*y -
y_0) + den(3)*y);
ZIR_TF_time_response = ilaplace(ZIR_TF);    % zir
response with initial conditions
                                           
% 3*exp(-2*t) + 10*t*exp(-2*t)
code ends here
for any difficulty in understanding can be resolved by furthur discussion. hope the solution is up to the mark.
Thank you.