0% found this document useful (0 votes)
259 views7 pages

ECE424FL Activity 1

This laboratory manual document provides details on an activity involving solving Laplace transform problems using the Scilab programming language. The activity objective is for students to be able to use Scilab to solve Laplace transform problems. The document provides two sample rational polynomial problems to work through, including expressing the polynomials in factored form, evaluating the polynomials and their derivatives at various values, and determining the partial fraction expansion and inverse Laplace transform. The Scilab code for solving each problem step-by-step is included. The conclusions section summarizes that Scilab can be used to efficiently solve Laplace transforms through its functions and syntax, avoiding manual computations, and can be applied to different problem types.

Uploaded by

jefferson rosimo
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)
259 views7 pages

ECE424FL Activity 1

This laboratory manual document provides details on an activity involving solving Laplace transform problems using the Scilab programming language. The activity objective is for students to be able to use Scilab to solve Laplace transform problems. The document provides two sample rational polynomial problems to work through, including expressing the polynomials in factored form, evaluating the polynomials and their derivatives at various values, and determining the partial fraction expansion and inverse Laplace transform. The Scilab code for solving each problem step-by-step is included. The conclusions section summarizes that Scilab can be used to efficiently solve Laplace transforms through its functions and syntax, avoiding manual computations, and can be applied to different problem types.

Uploaded by

jefferson rosimo
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/ 7

Saint Louis University

SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

NAMES: ROSIMO, JEFFERSON D. CLASS SCHEDULE: 6:00-9:00 MTW

ZWANZGER, MARIEL ANTONETTE F. DATE PERFORMED: 08-24-2020

ACTIVITY NO. 1
LAPLACE TRANSFORMS USING SCILAB

I. ACTIVITY OBJECTIVE:
At the end of the activity, the students should be able to solve Laplace transformation problems
using SCILAB.

II. EQUIPMENT NEEDED:


PC with Scilab

III. LABORATORY ACTIVITIES:


1. Read the activity notes and understand the examples.
2. Answer the following problems using the concepts and techniques presented in the activity notes .
Write your answers on the spaces provided.

Problem 1]
Given the rational polynomial
4 3 2
3s + 6s - 21s - 54s -54
P(s) = -----------------------------------------
4 3 2
s + 2s + 5s + 4s + 40

(a) Express P(s) in factored form. (d) Evaluate P'(s) at s=10


(s-3) (s+3) (s2+2s+2)
P(s) = -------------------------------------------- P'(s=10) = ___ 0.0693157____
(s2+4s+8) (s2-2s+5)

(b) Evaluate P(s) at s=10 (e) Evaluate P''(s) at s=-5

P(s=10) = ____2.6475358____ P''(s=-5) = ___ -0.2489904__

(c) Evaluate P(s) as s→∞

(c) P(s→∞) = _______Nan________

ECE 424FL: FEEDBACK AND CONTROL SYSTEMS


ELECTRONICS ENGINEERING DEPARTMENT
LABORATORY
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

Problem 2]
Obtain the Partial Fraction expanded form and then determine the inverse Laplace transform of the
following Laplace transforms.

4 3 2
7s + 75s + 280s + 572s +784
(a) X(s) = ------------------------------------------------------
5 4 3 2
s + 11s + 48s + 104s + 176s + 240

2 3s + 22 2s + 6
PFE: X(s) = -------------------- + -------------------- + --------------------
s+3 s2 + 8s + 20 s2 + 4

x(t) = _____ 2e-3t + 3e-4t cos(2t) + 5e-4t sin(2t) + 2cos(2t) + 3sin(2t)_____

5 4 3 2
10s + 42s + 61s + 40s + 20s + 4
(b) X(s) = -----------------------------------------------------
6 5 4 3 2
s + 5s + 9s + 7s + 2s

3 2 4 -5 3
PFE: X(s) = --------------- + --------------- + --------------- + --------------- + ---------------
s s2 s+1 (s+1)3 s+2

5e-t t2
x(t) = 3 + 2t + 4e-2t - ------------- + 3e-2t
__________________2_______________

IV. SCILAB PROGRAMS: (SHOW COMPLETE ALGORITHMS)

PROBLEM 1]

s=poly(0,'s') // Declare s as variable for polynomials


Ps=(3*s^4+6*s^3-21*s^2-54*s-54)/(s^4+2*s^3+5*s^2+4*s+40) // Declare the rational polynomial Ps
Psnum=numer(Ps) // extracts the numerator of P(s) and assigns it to Pnum(s)
Psden=denom(Ps) // extracts the denominator of P(s) and assigns it to Pden(s)
[FactorsPsnum, FactorsPsden,gPs]=factors(Ps) // Problem 1(a)
horner(Ps,10) // Problem 1(b)
horner(Ps,%inf) // Problem 1(c)
Psprime=derivat(Ps) // determines the first derivative of P(s) and assigns the derivative polynomial to H'(s)
horner(Psprime,10) // Problem 1(d)
Psprime2=derivat(derivat(Ps)) // determines the second derivative of P(s) and assigns it to P''(s)

ECE 424FL: FEEDBACK AND CONTROL SYSTEMS


ELECTRONICS ENGINEERING DEPARTMENT
LABORATORY
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

horner(Psprime2,-5) // Problem 1(e)

PROBLEM 2]
2a]
//2a
clear; clc;
s=poly(0,'s')
Xsn=7*s^4+75*s^3+280*s^2+572*s+784
Xsd=s^5+11*s^4+48*s^3+104*s^2+176*s+240
Xs=Xsn/Xsd
[FXsd,gXsd]=factors(denom(Xs))
RXsd=roots(denom(Xs))
Rs=Xsn/derivat(Xsd)
A1=horner(Rs, -3)
A2=horner(Rs, 2*%i)
A3=horner(Rs, -2*%i)
A4=horner(Rs, -4+2*%i)
A5=horner(Rs, -4-2*%i)

(A2/(s-2*%i)) + (A3/(s+2*%i))
(A4/(s+4-2*%i)) + (A5/(s+4+2*%i))

2b]

//2b
clear; clc;
s=poly(0,'s')
Xsn=10*s^5+42*s^4+61*s^3+40*s^2+20*s+4
Xsd=s^6+5*s^5+9*s^4+7*s^3+2*s^2
Xs=Xsn/Xsd
[FXsd,gXsd]=factors(denom(Xs))
RXsd=roots(denom(Xs))
Rs=Xsn/derivat(Xsd)

A1=horner(Rs, -2)
A2=horner(Rs, -1.0000075 + 0.0000129*%i)
A3=horner(Rs, -1.0000075 - 0.0000129*%i)
A4=horner(Rs, -0.9999851)
A5=horner(Rs, 0)
A6=horner(Rs, 0)

(A1/(s))+(A2/(s+2))
(A3/(s+1.0000075 - 0.0000129*%i)) + (A4/(s+.0000075 + 0.0000129*%i))
(A5/(s+0.9999851)) + (A6/(s))

V. OBSERVATIONS:

ECE 424FL: FEEDBACK AND CONTROL SYSTEMS


ELECTRONICS ENGINEERING DEPARTMENT
LABORATORY
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

IN THIS ACTIVITY WE WERE ABLE TO DECLARE POLYNOMIAL AND RATIONAL POLYNOMIAL


IN THE SCILAB USING THE DIFFERENT FUNCTIONS IN THE SCILAB. THE RATIONAL POLYNOMIAL
HAS A NUMERATOR AND A DENOMINATOR EXTRACTED TO BE ABLE TO SEPARATELY FIND
EACH OF ITS ROOTS. THIS ROOT CAN NOW BE USED AS A FACTORED FORM OF THE RATIONAL
POLYNOMIAL OR COULD BE DIRECTLY FACTORED USING A SET OF FUNCTIONS. IN
DETERMINING THE LAPLACE TRANSFORM OF A GIVEN RATIONAL POLYNOMIAL, WE USED A SET
OF FUNCTION WHICH APPLIES A PARTIAL FRACTION EXPANSION TO THE RATIONAL
POLYNOMIAL. MANIPULATING THE EXPANDED FORM OF RATIONAL POLYNOMIAL TO BE ABLE
TO CONFORM TO THE ENTRIES IN THE LAPLACE TRANSFORM TABLE.

VI. CONCLUSIONS (MINIMUM OF 5 SENTENCES, MUST ADDRESS THE OBJECTIVE OF


THE ACTIVITY)

THE LAPLACE TRANSFORM CAN BE SOLVED THROUGH THE DIFFERENT FUNCTIONS AND
PROPER SYNTAX OF SCILAB FROM A GIVEN POLYNOMIAL. WE ARE ABLE TO EVALUATE THE
POLYNOMIAL AND RATIONAL POLYNOMIAL THROUGH ITS OBTAINED FACTORED FORM
REGARDLESS OF THE GIVEN VALUE OF THE VARIABLE. WE ALSO USE PARTIAL FRACTION
EXPANSION AND SIMPLIFY THIS TO DETERMINE THE INVERSE LAPLACE TRANSFORM FROM THE
LOOK-UP TABLE, A SET OF FUNCTION IS USED IN PERFORMING PARTIAL FRACTION EXPANSION
ON A POLYNOMIAL WITH SINGULAR ROOTS AND A DIFFERENT SET OF FUNCTIONS IN
PERFORMING PARTIAL FRACTION EXPANSION ON A POLYNOMIAL WITH REPEATED ROOTS. WITH
THAT, THE LAPLACE TRANSFORM AND INVERSE LAPLACE TRANSFORM COULD NOW BE
DETERMINED. THIS METHOD OF USING SCILAB WITH PROPER SET OF FUNCTIONS AND SYNTAX
AVOIDS MISTAKES AND LENGTHY MANUAL COMPUTATIONS. THE PROGRAM CAN NOW BE USED
TO EASILY PROGRAM A DESIRED RESULT FOR DIFFERENT TYPES OF APPLICATION.

[PRACTICE PROBLEM 1] Given the rational polynomial

ECE 424FL: FEEDBACK AND CONTROL SYSTEMS


ELECTRONICS ENGINEERING DEPARTMENT
LABORATORY
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

4 3 2
3s + 6s - 21s - 54s -54
P(s) = ------------------------------------------
4 3 2 SCILAB PROGRAM:
s + 2s + 5s + 4s + 40
s=poly(0,'s') // Declare s as variable for polynomials
(a) Express P(s) in factored form. Ps=(3*s^4+6*s^3-21*s^2-54*s-54)/(s^4+2*s^3+5*s^2+4*s+40)
// Declare the rational polynomial Ps
Psnum=numer(Ps) // extracts the numerator of P(s) and assigns
(s-3) (s+3) (s2+2s+2) it to Pnum(s)
P(s) = -------------------------------------------- Psden=denom(Ps) // extracts the denominator of P(s) and assigns
it to Pden(s)
(s2+4s+8) (s2-2s+5) [FactorsPsnum, FactorsPsden,gPs]=factors(Ps) // Problem 1(a)
horner(Ps,10) // Problem 1(b)
(b) Evaluate P(s) at s=10 horner(Ps,%inf) // Problem 1(c)
Psprime=derivat(Ps) // determines the first derivative of P(s) and
assigns the derivative polynomial to H'(s)
P(s=10) = 2.6475358 horner(Psprime,10) // Problem 1(d)
Psprime2=derivat(derivat(Ps)) // determines the second
derivative of P(s) and assigns it to P''(s)
(c) Evaluate P(s) as s→∞ horner(Psprime2,0) // Problem 1(e)

P(s→∞) = ______Nan______

(d) Evaluate P'(s) at s=10

P'(s=10) = ___ 0.0693157____

(e) Evaluate P''(s) at s=0

P''(s=0) = ____ -0.4695_____

[PRACTICE PROBLEM 2]

ECE 424FL: FEEDBACK AND CONTROL SYSTEMS


ELECTRONICS ENGINEERING DEPARTMENT
LABORATORY
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

Obtain the Partial Fraction expanded form and then determine the inverse Laplace
transform of the following Laplace transforms.

4 3 2
7s + 75s + 280s + 572s +784
(a) X(s) = ------------------------------------------------------
5 4 3 2
s + 11s + 48s + 104s + 176s + 240

2 3s + 22 2s + 6
PFE: X(s) = -------------------- + -------------------- + --------------------
s+3 s2 + 8s + 20 s2 + 4

x(t) = _____ 2e-3t + 3e-4t cos(2t) + 5e-4t sin(2t) + 2cos(2t) + 3sin(2t)_____

SCILAB PROGRAM:

//2a
clear; clc;
s=poly(0,'s')
Xsn=7*s^4+75*s^3+280*s^2+572*s+784
Xsd=s^5+11*s^4+48*s^3+104*s^2+176*s+240
Xs=Xsn/Xsd
[FXsd,gXsd]=factors(denom(Xs))
RXsd=roots(denom(Xs))
Rs=Xsn/derivat(Xsd)
A1=horner(Rs, -3)
A2=horner(Rs, 2*%i)
A3=horner(Rs, -2*%i)
A4=horner(Rs, -4+2*%i)
A5=horner(Rs, -4-2*%i)

(A2/(s-2*%i)) + (A3/(s+2*%i))
(A4/(s+4-2*%i)) + (A5/(s+4+2*%i))

5 4 3 2
10s + 42s + 61s + 40s + 20s + 4
(b) X(s) = -----------------------------------------------------

ECE 424FL: FEEDBACK AND CONTROL SYSTEMS


ELECTRONICS ENGINEERING DEPARTMENT
LABORATORY
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE

LABORATORY MANUAL

6 5 4 3 2
s + 5s + 9s + 7s + 2s

3 2 4 -5 3
PFE: X(s) = --------------- + --------------- + --------------- + --------------- + ---------------
s s2 s+1 (s+1)3 s+2

5e-t t2
x(t) = 3 + 2t + 4e-2t - ------------- + 3e-2t
__________________2_______________

SCILAB PROGRAM:

//2b
clear; clc;
s=poly(0,'s')
Xsn=10*s^5+42*s^4+61*s^3+40*s^2+20*s+4
Xsd=s^6+5*s^5+9*s^4+7*s^3+2*s^2
Xs=Xsn/Xsd
[FXsd,gXsd]=factors(denom(Xs))
RXsd=roots(denom(Xs))
Rs=Xsn/derivat(Xsd)

A1=horner(Rs, -2)
A2=horner(Rs, -1.0000075 + 0.0000129*%i)
A3=horner(Rs, -1.0000075 - 0.0000129*%i)
A4=horner(Rs, -0.9999851)
A5=horner(Rs, 0)
A6=horner(Rs, 0)

(A1/(s))+(A2/(s+2))
(A3/(s+1.0000075 - 0.0000129*%i)) + (A4/(s+.0000075 + 0.0000129*%i))
(A5/(s+0.9999851)) + (A6/(s))

ECE 424FL: FEEDBACK AND CONTROL SYSTEMS


ELECTRONICS ENGINEERING DEPARTMENT
LABORATORY

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy