0% found this document useful (0 votes)
32 views9 pages

Mario Feedback Lab 12

Uploaded by

Mario Fernando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views9 pages

Mario Feedback Lab 12

Uploaded by

Mario Fernando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

ADAMSON UNIVERSITY

College of Engineering
Electronics and Communications Department

Experiment No. 1

Linear Constant Coefficient Differential


Equations

1030-1330 Wed

SCHEDULE

FEEDBACK AND CONTROL SYSTEM LAB

Group No. SUBJECT Grade

ATTENDANC CONTRIBUTI
E NAME ON
REMARKS
Mario Raphael B. Fernando

D.O.P. February 23, 2024 D.O.S. February 29, 2024

Engr. Joan Sta. Ana

Instructor
Module 1
LINEAR CONSTANT-COEFFICIENT DIFFERENTIAL EQUATIONS

Objective:

To be able to solve LCCDE by Direct Method or using Laplace Transform with


the aid of MATLAB.

Theoretical Discussion:
n i
∑ ai ddtxi =f (t )
A class of differential equations of the form i =0 is called linear
differential equation with constant coefficients. Linear Constant-Coefficient Differential
Equation (LCCDE) described a class of system called Linear Time Invariant (LTI)
system. The solution to LCCDE can be divided into two parts, characteristic or
homogeneous x c ( t ) solution and particular solution x p ( t ) . The sum of these solutions is
called the total solution x (t ) .
x (t )=x c ( t ) + x p ( t )
The homogeneous solution, is the solution of the differential equation when f ( t )
n
mk t
x c ( t )=∑ c k e
is equal zero. It is of the form k=1 , where m k is the root of auxiliary
n n
di x
∑ ai
i ∑ ai m i=0
polynomial corresponding to i=0 dt equivalent to i =0 .
The particular solution is the solution obtained by direct observation of the form
−t
of f ( t ) . For example when f ( t )=5 e , the corresponding particular solution is of the
n
di x
∑ ai i
form Ke , where K is obtained by evaluating i=0 dt by taking x=x p .
−t

The coefficients of the terms of the homogeneous solution can be obtained by


evaluating the total solution at their initial conditions.

Solution to LCCDE can also be obtained by taking the Laplace Transform of


n i
∑ ai ddtxi =f (t )
i =0 . The Laplace Transform of the independent variable L { x ( t ) }= X ( s ) can
be easily isolated to one side of the transformed equation. The last step is taking the
inverse Laplace of X ( s ) .

G( s ) Y ( s)
The transfer function is defined as the ratio of the transform of the output
U(s )
to the transform of the input taking all initial conditions to be equal to zero.
Y (s )
G( s ) = |InitialCondition=0
U ( s)

Matlab command reviews:

POLY Covert roots to polynomial.


POLY(A), when A is an N by N matrix, is a row vector with N+1 elements which are the
coefficients of the characteristic polynomial, DET(lambda*EYE(SIZE(A))-A).

POLY(V), when V is a vector, is a vector whose elements are the coefficients of the
polynomial whose roots are the elements of V. For vectors, ROOTS and POLY are
inverse functions of each other, up to ordering, scaling and round off error.

ROOTS Find polynomial roots.


ROOTS(C) computes the roots of the polynomial whose coefficients are the elements of
the vector C. if C has N+1 components, the polynomial is
C ( 1 )∗X N +.. .+C ( N )∗X +C ( N +1 ) .

RESIDUE Partial-fraction expansion (residues).


[R,P,K]=RESIDUE(B,A) finds the residues, poles and direct term of a partial fraction
B /A
expansion of the ratio of two polynomials ( s ) ( s ) .

If there are no multiple roots,


B( s ) R( 1 ) R (2 ) R( n )
= + +. ..+ + K(S )
A ( s ) s−P( 1 ) s−P (2 ) s−P( n )

Vectors B and A specify the coefficients of the numerator and denominator polynomials
in descending powers of s. the residues are returned in the column vector R, the pole
locations in column vector P, and the direct terms in row vector K. the number of poles is
n = length(A)-1 = length(R) = Length (P). The direct term coefficient vector is empty if
length(B) < length(A), otherwise length(K) = length(B)-length(A)+1.

If P(j) = … = P(j+m-1) is a pole of multiplicity m, then the expansion includes


terms of the form
R( j ) R ( j+1 ) R ( j+m−1 )
+ 2
+. ..+ m
s−P( j ) ( s−P ( j ) ) ( s−P( j ) )
[B,A] = RESIDUE(R,P,K), with 3 input arguments and 2 output arguments,
converts the partial fraction back to the polynomials with coefficients in B and A.

SYM Construct symbolic numbers, variables and objects.


S = SYM(A) constructs an object S, of class ‘sym’, from A. if the input argument
is a string, the result is a symbolic number or variable. If the input argument is a numeric
scalar or matrix, the result is a symbolic representation of the given numeric values.

X = sym (‘x’) creates the symbolic variable with name ‘x’ and stores the result in
x. x = sym (‘x’, ’real’) also assumes that x is real, so that conj(x) is equal to x. alpha =
sym(‘alpha’) and r = sym(‘Rho’, ‘real’) are other examples. Similarly, k = sym(‘k’,
‘positive’) makes k a positive (real) variable. x = sym(‘x’,’unreal’) makes x a purely
formal variable with no additional properties (i.e., insures that x is NEITHER real NOR
positive).

LAPLACE Laplace transform


L = LAPLACE(F) is the Laplace transform of the scalar sym F with default independent
variable t. the default return is a function of s. if F = F(s), then LAPLACE returns a
function of t: L = L(t). by definition L(s) = int(F(t)*exp(-s*t),0,inf), where int4egration
occurs with respect to t.

L = LAPLACE(F,t) makes L a function of t instead of the default s:


LAPLACE(F,t) < = > L(t) = int(F(x)*exp(-t*x),0,inf).

L = LAPLACE(F,w,z) makes L a function of z instead of the default s (integration with


respect to w).
LAPLACE(F,w,z) < = > L(z) = int(F(w)*exp(-z*w),0,inf).

Examples:
syms a s t w x
laplace (t^5) returns 120 / s^6
laplace(exp(a*t)) returns 1 / (s-a)
laplace(sin(w*x),t) returns w / (t^2+w^2)
laplace(cos(x*w),w,t) returns t / (t^2+x^2)
laplace(x^sym(3/2),t) returns 3 / 4*pi^(1/2)/t^(5/2)
laplace(diff(sym(‘F(t)’))) returns laplace (F(t),t,s)*s-F(0)

ILAPLACE Inverse Laplace transform


F = ILAPLACE(L) is the inverse Laplace transform of the scalar sym L with default
independent variable s. The default return is a function of t. If L = L(t), then ILAPLACE
returns a function of x: F = F(x).

By definition, F(t) = int(L(s)*exp(s*t),s,c-i*inf,c+i*inf) where c is a real number


selected so that all singularities of L(s) are to the left of the lines s = c, i = sqrt(-1), and
the integration is taken with respect to s.

F = ILAPLACE(L,y) makes F a function of y instead of the default t:


ILAPLACE(L,y) < = > F(y) = int(L(y)*exp(s*y),s,c-i*inf). Here y is a scalar sym.
F = ILAPLACE(L,y,x) makes F a function of x instead of the default t:
ILAPLACE(L,y,x) < = > F(y) = int(L(y)*exp(x*y),y,c-1*inf,c+i*inf), integration
is taken with respect to y.
Examples:
Syms s t w x y
ilaplace(1/(s-1)) returns exp(t)
ilaplace(1/(t^2+1) returns sin(x)
ilaplace(t^(-sym(5/2)),x returns 4/3/pi^(1/2)*x^(3/2)
ilaplace(y/(y^2+w^2),y,x) returns cos(w*x)
ilaplace(sym(‘laplace(F(x),x,s)’),s,x) returns F(x)

Procedure:

1. Determine the homogeneous solutions of the following differential equations:

d2 y(t)
2
+ 16 y (t )=u (t )
a. dt
Auxiliary equation: 1/s(s^2+16)
MATLAB Command: syms s t w x y
ilaplace(1/(s*(s^2+16)),t)

Roots of m: 0.0000 + 0.0000i


0.0000 + 4.0000i
0.0000 - 4.0000i

Homogeneous Solution:

d2 y( t) dy (t )
2
+8 +16 y ( t ) =u( t )
b. dt dt
Auxiliary equation: 1/s(s^2+8s+16)
MATLAB Command: syms s t w x y
ilaplace(1/(s*(s^2+8*s+16)),t)
Roots of m:

Homogeneous Solution:

d2 y( t) dy ( t )
2
+ 20 +50 y ( t )=u (t )
c. dt dt
Auxiliary equation: 1/s(s^2+20s+50)
MATLAB Command: syms s t w x y
ilaplace1/s(s^2+20s+50)
Roots of m:

Homogeneous Solution:
d2 y(t) dy (t )
2
+8 +16 y ( t ) =u( t )
2. Find the particular solutions of dt dt if
2
a. u( t ) =1+t

−2 t
b. u( t ) =2 e

c. u( t ) =10 cos(2 t− p/2)

d2 y(t) dy (t )
2
+8 +16 y ( t ) =1+t 2
3. Find the total solution of dt dtif all initial conditions are zero.
Auxiliary equation:(((1/s)+(2/s^3))/(s^2 + 8*s + 16),t)
Total Solution:

d2 y( t) dy (t )
2
+8 +16 y ( t ) =1+t 2
4. Using Laplace transform, determine the total solution of dt dt .
All initial conditions are assumed zero.

U(s): 1/s+2/s^3
Y(s): ((1/s)+(2/s^3))/(s^2+8*s+16)
Y(t): t^2/16 - (11*exp(-4*t))/128 - (9*t*exp(-4*t))/32 - t/16 + 11/128
Analysis
Laplace and Inverse laplace transforms time-domain functions into their Laplace domain
counterparts, where complex mathematical operations become simpler. By converting
differential equations into algebraic equations, Laplace transforms provide a powerful
tool for solving linear systems and differential equations efficiently. This transformation
enables engineers and researchers to analyze system behavior, stability, and response
characteristics with ease. Using Laplace transforms in MATLAB, the researcher can
convert the system's differential equations into the Laplace domain, facilitating analysis
through algebraic manipulation. The resulting transfer function provides insights into
system stability, transient response, and frequency response characteristics, crucial for
designing robust control systems.
Conclusion
In conclusion, MATLAB's laplace and ilaplace functions offer a powerful suite of tools
for engineers and researchers working in fields such as control systems, signal
processing, and differential equations. The laplace function allows for the transformation
of time-domain functions into the Laplace domain, facilitating analysis and design in the
frequency domain. Conversely, the ilaplace function enables the inverse transformation,
providing insights into system behavior and facilitating the determination of time-domain
responses from frequency-domain representations

You might also like