900 likes | 1.11k Views
電腦在工程數學上之應用 (Symbolic Computation in Engineering Mathematics). Chapter 5. 楊燿州 台大機械系 教授兼副主任 投影片原作者 (97): 台大應力所 張培仁 教授 投影片小改版 (98): 台大機械系 楊燿州 教授. Outline. The Laplace Transform Properties of Laplace Transform Laplace Transform Using Maxima Applications Fourier Transform
E N D
電腦在工程數學上之應用(Symbolic Computation in Engineering Mathematics) Chapter 5 楊燿州 台大機械系 教授兼副主任 投影片原作者(97): 台大應力所 張培仁 教授 投影片小改版(98): 台大機械系 楊燿州 教授
Outline • The Laplace Transform • Properties of Laplace Transform • Laplace Transform Using Maxima • Applications • Fourier Transform • Properties of Fourier Transform • Fourier Transform Using Maxima • Applications • Fast Fourier Transform • Fast Fourier Transform Using Maxima • Applications
Outline • The Laplace Transform • Properties of Laplace Transform • Laplace Transform Using Maxima • Applications • Fourier Transform • Properties of Fourier Transform • Fourier Transform Using Maxima • Applications • Fast Fourier Transform • Fast Fourier Transform Using Maxima • Applications
The Laplace Transform • We consider a function f(t) of the real variable t defined for 0≦t<∞. To the function f(t) we assign a function F(s) by the rule4 provided that the integral has meaning for some values of s. We call the function F(s) the Laplace transform of f(t) and write Lis an operator that assigns functions of s to functions of t. The operator L is also called the Laplace transform.
Outline • The Laplace Transform • Properties of Laplace Transform • Laplace Transform Using Maxima • Applications • Fourier Transform • Properties of Fourier Transform • Fourier Transform Using Maxima • Applications • Fast Fourier Transform • Fast Fourier Transform Using Maxima • Applications
Properties of Laplace Transform 1. Definition 2. Inverse Transform 3. Linearity
Properties of Laplace Transform 4. Time Shifting 5. Shifting in the s Domain Why ?
Properties of Laplace Transform 6.Time Scaling 7.Differentiation in the Time Domain 8.Integration in the Time Domain
Properties of Laplace Transform 9.Differentiation in the s Domain • Convolution
Properties of Laplace Transform 11.Initial-Value Theorem 12.Final-Value Theorem
Outline • The Laplace Transform • Properties of Laplace Transform • Laplace Transform Using Maxima • Applications • Fourier Transform • Properties of Fourier Transform • Fourier Transform Using Maxima • Applications • Fast Fourier Transform • Fast Fourier Transform Using Maxima • Applications
Laplace Transform Using Maxima • laplace(exp, ovar, lvar) • Takes the laplace transform of exp with respect to the variable ovar and transform parameter lvar. • exp may involve only the functions exp, log, sin, cos, sinh, cosh, and erf. • Functional relationships must be explicitly represented in order for laplace to work properly
Laplace Transform Using Maxima Example: (%i1) laplace(%e^(2*t+a)*sin(t)*t,t,s);
Laplace Transform Using Maxima • laplace knows about the delta function. • We can use the assume function in the computation.
Laplace Transform Using Maxima • ilt(exp, lvar, ovar) • Takes the inverse Laplace transform of exp with respect to lvar and parameter ovar. • exp must be a ratio of polynomials whose denominator has only linear and quadratic factors. • By using the functions laplace and ilt together with the solve or linsolve functions, you can solve a single differential or convolution integral equation or a system of them.
Laplace Transform Using Maxima • Example
Laplace Transform Using Maxima • Example (cont.)
Laplace Transform Using Maxima • atvalue (form, list-of-equations, value) • Assigns the boundary value value to form at the points specified by list-of-equations. • The form must be a function, f(var1, ..., varn), or a derivative, diff(f(var1, ..., varn), vari, ni, varj, nj, ...) in which the functional arguments explicitly appear.
Laplace Transform Using Maxima • Example:
Laplace Transform Using Maxima • Example: (cont.)
Laplace Transform Using Maxima • Example: (cont.) • we may try the following just for comparsion
Laplace Transform Using Maxima • solve(exp, var) • solve(exp, var) solves the algebraic equation exp for the variable var and returns a list of solution equations in var. • If exp is not an equation, it is assumed to be an expression to be set equal to zero.
Laplace Transform Using Maxima Example:
Laplace Transform Using Maxima • desolve([equ1, ..., equn], [var1, ..., varn]) • The function desolve solves systems of linear ordinary differential equations. • The equi are differential equations in the dependent variables var1, ..., varn. • The functional relationships must be explicitly indicated in both the equations and the variables.
Laplace Transform Using Maxima • Example: 先清除記憶體 kill(all);
Laplace Transform Using Maxima • Example (cont.):
Laplace Transform Using Maxima • Example (cont.): (“%o?” should be consistent with the output on your computer) (“diff” in %i6 means all the differentiations are carried out)
Laplace Transform Using Maxima • specint(expr, ovar) • A special integration function which can be used to compute Laplace transform • Takes the Laplace transform of expr with respect to the variable ovar. • expr can involve special functions.
Laplace Transform Using Maxima • Example:
Outline • The Laplace Transform • Properties of Laplace Transform • Laplace Transform Using Maxima • Applications • Fourier Transform • Properties of Fourier Transform • Fourier Transform Using Maxima • Applications • Fast Fourier Transform • Fast Fourier Transform Using Maxima • Applications
Solution of Differential Equations • Let Na(t), Nb(t), and Nc(t) represent the number of nuclei of three radioactive substances A, B and C, which decay according to the scheme The functions Na(t), Nb(t), and Nc(t) are known to obey the system of differential equations as given below: diff(na(t),t) = -la*na(t) diff(nb(t),t) = -lb*nb(t) + la*na(t) diff(nc(t),t) = lb*nb(t) Assume that Na(0) = N0 and Nb(0) = Nc(0) = 0. Solve the problem by Laplace transform methods:
Application to Feedback Control • Consider the control system shown in the figure. This system represents an automatic position-control system that can be used in a tracking antenna. • The input r(t) is the desired angular position of the object to be tracked and the output is the position of the antenna. • The first subsystem is an amplifier with transfer function H1(s) = 8 and the second subsystem is a motor with transfer function H2(s)=1/s(s+a), where 0<a<5. • Find the step response of this system with a = 2 and a =3.
Application to Feedback Control • Plot the result plot2d([y2,y3],[t,0,5]);
Application to Feedback Control • The first system (a = 2) has a rise time of 0.48s and the second system (a =3) has a rise time of 0.6s. • The vershoots are 30% and 14%, respectively. • Systems with longer rise times are inferior to those with shorter rise time. • Reducing the rise time increases the overshoot, however, high overshoots may not be acceptable.
Exercise 1 dx/dt=2x-3y dy/dt=y-2x x(0)=0; y(0)=3 solve x(t) and y(t) • Exercise 2 y’’ - 3y’ + 2y = 4 * exp(2t) y(0)=-3; y’(0)=5 find y(t)
Homework 1 x’’-y’+3x=15exp(-t) y’’-4x’+3y=15sin(2t) x(0)=35; x’(0)=-48; y(0)=27; y’(0)=-55 solve x(t) and y(t) • Homework 2 y’’’ - 3y’’ + 3y’ - y = t^2 * exp(t) y(0)=1; y’(0)=0; y’’(0)=-2 find y(t)
Homework 3 • Find one engineering application of Laplace transform. State the problem (in Chinese or English), and solve the problem by using Maxima.
Outline • The Laplace Transform • Properties of Laplace Transform • Laplace Transform Using Maxima • Applications • Fourier Transform • Properties of Fourier Transform • Fourier Transform Using Maxima • Applications • Fast Fourier Transform • Fast Fourier Transform Using Maxima • Applications
Fourier Transform • We consider a function f(t) of the real variable t defined for and continuous (or piecewise continuous). To the function f(t) we assign a new function f(w) by the rule provided that the integral has meaning for all w. We call the function Φ (w) the Fourier transform of f(t) and write • Φ is an operator that assigns functions of w to functions of t. The operator Φ is also call the Fourier transform.
Properties of Fourier Transform 1. Definition 2. Inverse Transform 3. Linearity 4. Time Shifting • Shifting in the w Domain
Properties of Fourier Transform 6. Time Scaling 7. Differentiation in the Time Domain 8. Integration in the Time Domain 9. Convolution 10.Duality
Fourier Transform Using Maxima Fourier Series Any periodic function f(x) with period 2p can be approximated as: where 48
Fourier Transform Using Maxima • fourier(f, x, p) Produces a list of the Fourier coefficients of f(x) defined on the interval [-p, p].
Fourier Transform Using Maxima • Example: