Evaluate the following series of equations using matlab


Instructor: William Mugge

Please type your responses to the sections below. The provided descriptions of each section, as well as this text, should be removed after your own writing is complete.

1. Objective

What is the purpose of the experiment?

2. Procedure

Write an explanation of the theory or procedure behind the exercise. Do not re-list the procedure as given in the laboratory manual or give a step-by-step account of the steps you took.

3. Results and Calculations

Give the experimental data in tabular or graphical form. Show samples of calculations. If applicable, include relevant MATLAB results such as graphs of output and command screen history. These can be attached as an appendix if needed.

4. Discussion

Discuss the results or your exercise and show how the objectives were met. Comment on how the results correlate with theoretical values. What are some causes of error in the results?

5. Conclusions

Briefly reiterate the key points of the above sections. Was the experiment considered a success? What (if anything) could have been done differently or better? What are some lessons learned?

Laboratory Exercise: Laplace and Inverse Laplace Functions in Matlab

Introduction

The programming package MATLAB is used to evaluate the Laplace Transform and Inverse Laplace Transform of several functions. Before entering equations, enter "syms s t" to define s and t as symbols.

Procedure

Evaluate the following three functions in the lab using MATLAB:

a) y(t)=4+3t+2e^(-3t)

b) f(t)=2e^(-4t)+sin6t

c) c(t)=5te^(-3(t-2))

Convert each of the three equations to frequency domain both by using the MAT lab command and by hand. These equations are determined in MATLAB using the laplace(F) command.

Next, evaluate the following frequency domain equations and convert them to time domain. This is the inverse operation and will use the ilaplace(F) MATLAB command.

a) Y(s)=2/s+6/(s+3)^2

b) F(s)=(s+2)/(s(s+1))

c) C(s)=(4s+6)/((s+1)(2s^2+12s+16))

Show all MATLAB Command Window results. With each window, label the problem with name, problem number and the result.

Laboratory Exercise: Differential Equations Solved in MATLAB

Introduction

The programming package MATLAB is used to evaluate the Laplace Transform and Inverse Laplace Transform as well as total solutions for differential equations. Before entering equations, enter "syms s t" to define s and t as symbols.

Procedure

Evaluate the following function in the lab using MATLAB:

2 (d^2 y)/(dx^2 ) + 12dy/(dx )+10y=8;y(0)=0 and dy/(dx ) (0)=1

Evaluate the following series of equations using MATLAB:

(di_1)/(dt )+20i_1-10i_2=100u(t)

(di_2)/(dt )+20i_2-10i_1=0

Find equations for each variable. For #1 find the value of y(t). For #2 find the value of i1(t) and i2(t). (Initial conditions for i1(t) and i2(t) are zero)

Use the command dsolve(‘eq1', ‘eq2',...,'cond1','cond2',...,'v') where ‘eq1' represents the first differential equation in the series and ‘cond1' represents the first set of initial conditions in the series of equations and ‘v' represents the independent variable.

Show all MATLAB Command Window results. With each window, label the problem with name, problem number and the result.

The equations above would be entered:

syms s
dsolve(‘(2*D2y)+(12*Dy)+(10*y)=8','y(0)=0','Dy(0)=1')
[i1,i2]=dsolve('(Di1)+(20*i1)-(10*i2)=100','(Di2)+(20*i2)-(10*i1)=0','i1(0)=0','i2(0)=0')

Also, on the website is a tutorial titled Solving ODE in MATLAB.

1-a
>>syms t
y(t)=4+3*t+2*exp(-3*t)
laplace(y(t))
y(t) =
3*t + 2*exp(-3*t) + 4
ans =
2/(s + 3) + 4/s + 3/s^2

1-b
>>syms t
>>f(t)=2*exp(-4*t)+sin(6*t)
f(t) =
2*exp(-4*t) + sin(6*t)
>>laplace(f(t))
ans =
2/(s + 4) + 6/(s^2 + 36)
1-c
syms t
>>c(t)=5*t*exp(-3*(t-2))
c(t) =
5*t*exp(6 - 3*t)
>>laplace(c(t))
ans =
(5*exp(6))/(s + 3)^2

2-a

>>syms s
>> y(s)=2/s+6/(s+3)^2;
>>ilaplace(y(s))
ans =
6*t*exp(-3*t) + 2

2-b

>>syms s
>> f(s)=(s+2)/(s*(s+1))
f(s) =
(s + 2)/(s*(s + 1))
>>ilaplace(f(s))
ans =
2 - exp(-t)

2-c

>>syms s
>> c(s)=(4*s+6)/((s+1)*(2*s^2+12*s+16))
c(s) =
(4*s + 6)/((s + 1)*(2*s^2 + 12*s + 16))
>>ilaplace(c(s))
ans =
exp(-t)/3 + exp(-2*t)/2 - (5*exp(-4*t))/6

EX 3

1
>>syms x
>>dsolve('(2*D2y)+(12*Dy)+(10*y)=8','y(0)=0','Dy(0)=1')
ans =
4/5 - exp(-5*t)/20 - (3*exp(-t))/4

2
>>syms t
>> [i1,i2]=dsolve('(Di1)+(20*i1)-(10*i2)=100','(Di2)+(20*i2)-(10*i1)=0','i1(0)=0','i2(0)=0')
i1 =
exp(-30*t)*((5*exp(30*t))/3 + exp(20*t)*(5*exp(10*t) - 5) - 5/3)
i2 =
exp(-30*t)*(exp(20*t)*(5*exp(10*t) - 5) - (5*exp(30*t))/3 + 5/3)

Solution Preview :

Prepared by a verified Expert
Simulation in MATLAB: Evaluate the following series of equations using matlab
Reference No:- TGS01472863

Now Priced at $35 (50% Discount)

Recommended (91%)

Rated (4.3/5)