Engineering Analysis: Basics of Functions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 63

ENGINEERING ANALYSIS

CHAPTER 1

BASICS OF FUNCTIONS

Prof. Dr. Yazen A. K. 1


1. INTRODUCTION:
❑ Engineering Analysis involves the applications of scientific analytic
principles and how to apply mathematics to solve the engineering
problems in almost scientific fields.

This chapter presents the mathematical


descriptions and representations of the
functions with their classifications.

2
2. FUNCTIONS AND THEIR CLASSIFICATION:
➢ The function represents a physical quantity or variable that depends
on other variable.
➢ It may be a procedure or a rule about the behaviour of this quantity.
➢ The function is a dependent variable of one or more independent
variables. f (x1, x2, x3, …).
function

➢ The functions are considered as functions like Temperature, Light,


Speech, Sound, images, Pressure, Vibration, speed, electrical voltage,
electrical current … etc.
System
➢ The Systems (devices) do specific functions. Input (H)
Output
3
➢ Mathematically, a function is represented as a function of an independent
variable. Usually, (in our study), the time “ t ” represents the independent
variable. Thus, a function is denoted by f(t). It is called “time domain
function”.

x(t)= t+2 , f(t)=t2-3 , g(t)=2t –t3+8

4
f(t) = y

function (input) = output

t Function y

Input Output

5
Example: Draw the following function f(t)=2t +1

Solution:

Function Table
Input Output
(Domain) (Range)
f(t)=
t
2t+1
0 1
1 3
2 5
3 7
and so on

6
3. Basic Function Parameters:
1. Amplitude or Peak Value (P),
2. Peak to Peak Value (P-P).
3. Time Period ( T ): The duration time of one complete cycle (sec).
4. Frequency (f ): it is the number of complete cycles per unit time (usually
second) measured by Hz.

1Hz = 1 cycle per sec, 2 Hz= 2 cycles per sec, 1 KHz = 1000 cycles
per sec and so on. 𝐓 = and
𝟏 𝟏
𝐟=
𝐟 𝐓

If the frequency f = 100 Hz then T = 1/f = 1/100 = 0.01 sec

5. Phase (F): the delay or lead between functions (phase shift).


7
8
9
Remember that:

and
𝟏 𝟏
𝐓= 𝐟=
𝐟 𝐓

10
Phase Shift (F)

11
4. Classification of Functions:
The time domain functions can be classified by different ways as
following:

1. Continuous-Time vs Discrete-Time functions.


2. Analog (continuous-Valued) vs Digital functions (Discrete-Valued).
3. Deterministic vs Random functions.
4. Even vs Odd functions.
5. Periodic vs Non-periodic functions.
vs = versus
6. Energy vs Power functions.
7. Real vs Complex functions.
12
Continuous-Time vs Discrete-Time functions:
A function x(t) is a continuous-time function if t is a continuous variable. If t is
a discrete variable, then it is defined at discrete times, and called discrete-time
function x(n) . Since a discrete-time function is defined at discrete times.

The discrete-time function is often identified as a sequence of numbers denoted


by xn or x(n), where n is integer. Only at some discrete time points 0, 1, 2, ….
there is a value of the function x. ts is defined as the sampling time or time
between adjacent samples (sec). 13
Analogue vs Digital functions:

If a time function can take on any value in an interval, then the function
x(t) is called an analogue function. If a function can take on only a finite
number of distinct values, then we call this function a digital function.

❑ Infinite set of values means Analogue.


❑ Finite set of values means Digital.

14
Deterministic vs Random functions:

Deterministic functions are those functions whose values are completely


specified for any given time. Thus, a deterministic function can be
modelled or represented mathematically by a function.

Random functions are those functions that can not be represented as a


function and take random values at any given time, then it must be
characterized and treated statistically.

15
Even vs Odd functions:
A function x ( t ) or x(n) is referred to as an even function if
x ( - t ) = x ( t ) continuous
x ( - n ) = x ( n ) discrete

A function x ( t ) or x[n] is referred to as an odd function if


x( - t )= - x( t ) continuous
x( - n )= - x ( n ) discrete

16
Periodic vs Non-Periodic Functions:
A time function is said to be periodic with period T if it repeats itself at
each time T for which: x(t + T ) = x ( t ) for all t

18
18
Famous Types of Periodic Functions

19
Energy vs Power Functions:

20
Real versus Complex functions:
A function is a real function if its values are real numbers. A function is a
complex function if its value is a complex number. A general complex
function x(t) is a function of the form:
x ( t ) = x1 ( t ) + i x2 ( t )

➢ The Real function can be represented graphically by only ONE plot


which is called (Magnitude Characteristics c/cs). Denoted by |x|.

➢ The Complex function should be represented graphically by TWO plots


which are called:
1. (Magnitude Characteristics c/cs) plot, denoted by |x|.
2. (Phase Characteristics c/cs) plot, denoted by ∟q measured in Rad or Deg.

21
22
5. Basic (elementary) Functions:

1. Unit Impulse function or (Delta Function).

2. Unit Step Function.

3. Ramp Function.

4. Exponential Function.

5. Sinusoidal Function.

23
1. Impulse function (Delta Function): English physicist

The unit impulse function d (t), also known as the Dirac delta function,
plays a central role in system analysis. It is defined as following:

24
2. Unit Step Function:
The unit step function u(t), also known as the Heaviside step function, is
defined as:
English Engineer

25
The Relation between Impulse function and Unit step Function

➢ The impulse function is the ➢ The unit step function


derivative of the unit step is the Integration of
function is : the impulse function
is :
𝑑𝑢(𝑡) ∞
𝛿 𝑡 =
𝑑𝑡 𝑢 𝑡 = න 𝛿 𝑡 − 𝜏 𝑑𝜏
𝜏=0
26
3. Ramp Function:
The ramp function r(t) is defined as following:

27
28
Relation between ramp function and unit step function:

➢ The derivative of a ramp function is unit function:

𝐝𝐫(𝐭)
𝐮 𝐭 =
𝐝𝐭

➢ The Integration of the unit step function is a ramp function:

𝑟 𝑡 = න 𝑢 𝑡 − 𝜏 𝑑𝜏
𝜏=0
29
4. Real Exponential Function:
The exponential function x(t)= exp (at) or x(t) = eat , a is real number

30
Different real exponential functions

𝟏 𝟏

𝒆𝒕 𝒆−𝒕 𝒆𝒕 𝒆 𝒕

31
5. Sinusoidal Functions: W for chap 2.

The Sinusoidal function could be sine or cosine.


Then: x(t) = A sin(wt+F) or x(t) = A cos(wt+F)

A: Amplitude (Magnitude),
w: Angular Frequency (rad/sec), where w = 2pf
F: Phase shift (rad) Horizontal Shift

If A = 1 and F = 0, then x(t) = sin(wt) and x(t) = cos(wt) , as shown below:

32
Example:
given the following function:
𝝅
𝒙 𝒕 = 𝟏𝟎 𝒔𝒊𝒏(𝟑𝟏𝟒𝒕 + ),
𝟐
Find the peak value, p-p value, the frequency in Hz, the frequency in rad/sec, the phase shift
angle, the time period in sec, and find x at time =15 sec i.e. x(15)
Solution:
1. The peak value (amplitude) = 10
2. The peak to peak value (p-p) =20 ω = 2πf

𝝎 𝟑𝟏𝟒
3. The frequency (f )= = ≈ 𝟓𝟎 𝑯𝒛
𝟐𝝅 𝟐𝝅
4. The angular frequency (w) = 314 rad/sec
𝝅
5. The phase shift angle (f) = rad or 90o
𝟐

6. Time period ( T )=
𝟏 𝟏
= 𝟓𝟎 = 𝟎. 𝟎𝟐 𝒔𝒆𝒄
𝒇

𝝅
7. 𝒙 𝟏𝟓 = 𝟏𝟎 𝒔𝒊𝒏 𝟑𝟏𝟒 × 𝟏𝟓 + 𝟐 = −𝟕. 𝟐𝟗𝟗 33`
Complex Exponential Function: Swiss mathematician

x(t) = 𝒆±𝒋𝝎𝒐 t = 𝒄𝒐𝒔 𝝎𝒐 𝒕 ± 𝒋𝒔𝒊𝒏 𝝎𝒐 𝒕 [Euler's Formula]

Euler's Formula:

𝑒 ±𝑗𝜃 = 𝑐𝑜𝑠𝜃 ± 𝑗𝑠𝑖𝑛𝜃

1 𝑗𝜃
𝑐𝑜𝑠𝜃 = [𝑒 + 𝑒 −𝑗𝜃 ]
2

1
𝑠𝑖𝑛𝜃 = [𝑒 𝑗𝜃 − 𝑒 −𝑗𝜃 ]
2𝑗
34
Special Angles
q (Rad) q (Deg) sin cos
0 0 0 1
p/2 90 1 0
p 180 0 -1
3p/2 270 -1 0
2p 360 0 1
35
Example:
If A = 2+j4 and B= 3-j7 , find the following:
A+B , A⨯B , A/B in both rectangular, polar and exponential forms
Solution:
A+B
𝑜
= (2+j4) + (3-j7) = (2+3) + j(4-7) = 5 – j3 = 5.83∠-30.96o in polar = 5.83𝑒 −𝑗30.96 in exp

𝐴 × 𝐵 = 2 + 𝑗4 × 3 − 𝑗7
= 2 3 + 2 −𝑗7 + 𝑗4 3 + 𝑗4 −𝑗7
= 6 − 𝑗14 + 𝑗12 + 28 = 34 − 𝑗2
𝑂𝑟, 𝑖𝑡 𝑐𝑎𝑛 𝑏𝑒 𝑑𝑜𝑛𝑒 𝑏𝑦 𝑐𝑜𝑛𝑣𝑒𝑟𝑡𝑖𝑛𝑔 𝑓𝑟𝑜𝑚 𝑟𝑒𝑐𝑡𝑎𝑛𝑔𝑢𝑙𝑎𝑟 𝑓𝑜𝑟𝑚𝑠 𝑡𝑜 𝑃𝑜𝑙𝑎𝑟 𝑓𝑜𝑟𝑚𝑠
𝐴 × 𝐵 = 2 + 𝑗4 × 3 − 𝑗7 = 4.472∟63.4o × 7.6∟−66.8o
𝑜
=33.98∠-3.4o in polar = 33.98𝑒 −𝑗3.4 in exp
=34-j2 in rect
𝐴 4.472∟63.4o 𝑜
= = 0.588∟130.2 in polar = 0.588𝑒 −𝑗130.2 in exp
𝐵 7.6∟− 66.8o

=-0.38+j0.45 in rect
36
Homework (HW):
If Z = 3+j4 , find Z in polar and exponential
If A = 3-j4 , find A in polar and exponential
If B = j4 , find B in polar and exponential
If M = -j4 , find M in polar and exponential
If C = 3 , find C in polar and exponential
If D = -3 , find D in polar and exponential
If F = 10 , find F in Rectangular and exponential
If N = 5 , find N in Rectangular and exponential

If G = 20ejp , find F in Rectangular and Polar

If H = 4e-jp/2 , find H in Rectangular and Polar

Find: Z+A , A-Z , B+A , C+B , Z⨯A , Z/A , F+N , F/N , G⨯H , H÷G , G+A , G⨯F , MxD, BxD

37
6. Mathematical Representation of Real Deterministic Functions:
1. Linear Periodic Functions: This type of functions can be simply represented
by representing only for one complete period ( T ) by using the straight line
equations formula for each line segment during this period:
(y-y1) = m(x-x1) or y = mx + b
Then

Where:
x is the independent variable. Here in our study, x will be the time “ t “
y is the dependent variable or can be written as f(t) , h(t) , … as given.

m is the slope of the specified line segment in which


∆𝒚
𝒎=
∆𝒙

x1, y1 are the coordinates of a point that belongs to the specified line segment.

38
Example:
Find the math function of the
following triangular periodic time
function.

Solution:
▪ Choose one complete time period
(cycle) to be considered, here, the
period T is indicated to be from 0 to 4

▪ During this period, there are three straight line segments as indicated by red, green and orange
▪ 1st (𝒓𝒆𝒅) 𝒔𝒆𝒈𝒎𝒆𝒏𝒕 𝒊𝒔 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒅𝒖𝒓𝒊𝒏𝒈 𝒕𝒉𝒆 𝒑𝒆𝒓𝒊𝒐𝒅 𝟎 , 𝟏 𝒐𝒓 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒇𝒐𝒓 𝟎 ≤ 𝒕 ≤ 𝟏
▪ 2nd (𝒈𝒓𝒆𝒆𝒏) 𝒔𝒆𝒈𝒎𝒆𝒏𝒕 𝒊𝒔 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒅𝒖𝒓𝒊𝒏𝒈 𝒕𝒉𝒆 𝒑𝒆𝒓𝒊𝒐𝒅 𝟏 , 𝟑 𝒐𝒓 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒇𝒐𝒓 𝟏 ≤ 𝒕 ≤ 𝟑
▪ 3rd (𝑶𝒓𝒂𝒏𝒈𝒆) 𝒔𝒆𝒈𝒎𝒆𝒏𝒕 𝒊𝒔 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒅𝒖𝒓𝒊𝒏𝒈 𝒕𝒉𝒆 𝒑𝒆𝒓𝒊𝒐𝒅 𝟑 , 𝟒 𝒐𝒓 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒇𝒐𝒓 𝟑 ≤ 𝒕 ≤ 𝟒 39
▪ Indicate the important points
that belong to these segments
(each segment needs at least
two points)

▪ For the 1st period [0, 1], find the slope of the 1st segment (red): 𝒎 = ∆𝒙 = 𝟏−𝟎 = 𝟐
∆𝒚 𝟐−𝟎

▪ Choose a point, like (0, 0) or (1, 2) to be the nominated point (x1,y1). (0, 0) is selected.
▪ Apply the line equation (y-y1)= m(x-x1) → (y-0)=2(x-0) → y = 2x → f(t)=2t
▪ Repeat the above three steps on the 2nd and the 3rd segments.

▪ For the 2nd period [1, 3], find the slope of the 2nd segment (green): 𝒎 = ∆𝒙 = 𝟏−𝟐 = −𝟐
∆𝒚 𝟐−𝟎

▪ Choose a point, like (1, 2) or (2, 0) or (3,-2) to be nominated point (x1,y1). (2, 0) is selected.
▪ Apply the line equation (y-y1)= m(x-x1) → (y-0)=-2(x-2) → y =-2x+4 → f(t)=-2t+4
▪ For the 3rd period [3, 4], find the slope of the 3rd segment (Orange): 𝒎 = ∆𝒙 = 𝟒−𝟑 = 𝟐
∆𝒚 𝟎−(−𝟐)

▪ Choose a point, like (3, -2) or (4, 0) to be the nominated point (x1,y1). (4, 0) is selected.
▪ Apply the line equation (y-y1)= m(x-x1) → (y-0)=2(x-4) → y = 2x-8 → f(t)=2t-8 40
2𝑡 𝑓𝑜𝑟 0≤𝑡≤1
𝒇 𝒕 = −2𝑡 + 4 𝑓𝑜𝑟 1≤𝑡≤3
2𝑡 − 8 𝑓𝑜𝑟 3≤𝑡≤4

41
2. Linear Non-Periodic Functions:
This type of functions can be simply found by representing the whole given period using
the straight line equations for each line segment.

Example:
Find the function of the following time function shown
beside.
Solution:
▪ During the given period [0 , 3], there are two straight line segments as
indicated by red and green.
▪ Note: any vertical line has NO equation with respect to time.
▪ 1st (𝒓𝒆𝒅) 𝒔𝒆𝒈𝒎𝒆𝒏𝒕 𝒊𝒔 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒅𝒖𝒓𝒊𝒏𝒈 𝒕𝒉𝒆 𝒑𝒆𝒓𝒊𝒐𝒅 𝟎 , 𝟐 𝒐𝒓 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝟎 ≤ 𝒕 ≤ 𝟐
▪ 2nd (𝒈𝒓𝒆𝒆𝒏) 𝒔𝒆𝒈𝒎𝒆𝒏𝒕 𝒊𝒔 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝒅𝒖𝒓𝒊𝒏𝒈 𝒕𝒉𝒆 𝒑𝒆𝒓𝒊𝒐𝒅 𝟐 , 𝟑 𝒐𝒓 𝒅𝒆𝒇𝒊𝒏𝒆𝒅 𝟐 ≤ 𝒕 ≤ 𝟑

42
▪ Indicate the important points that belong to those segments that
have slopes (each segment needs at least two points).
▪ Any Horizontal Segment does not need points indication. It is a
constant function with time. Its slope (m) = 0.

▪ For the 1st period [0, 2], it is the horizontal line segment (red):
It is a constant function with time during this time period. Its slope (m) = 0

then: h(t) = 1 during [0 , 2]

▪ For the 2nd period [2, 3], find the slope of the segment (green): 𝒎 = ∆𝒙 = 𝟑−𝟐 = 𝟏
∆𝒚 𝟐−𝟏

▪ Choose a point, like (2 , 1) or (3, 2) to be the nominated point (x1,y1). (2, 1) is selected.

▪ Apply the line equation (y-y1)= m(x-x1) → (y-1)=1(x-2) → y = x-1 → h(t)=t-1

1 𝑓𝑜𝑟 0 ≤ 𝑡 ≤ 2
𝒉 𝒕 = 𝑡−1 𝑓𝑜𝑟 2 ≤ 𝑡 ≤ 3
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 43
BASIC OPERATIONS ON FUNCTIONS: there are THREE types of operations:
1. SHIFT OPERATIONS:
• Time Shift [ DELAY or ADVANCE]
• Magnitude Shift [ UP or DOWN]
2. SCALE OPERATIONS:
• Time Scale [ EXPAND or COMPRESS]
• Magnitude Scale [ AMPLIFY or ATTENUATE (shrink)]
3. FLIP OPERATIONS:
• Time Flip [HORIZONTAL FLIP]
• Magnitude Flip [ VERTICAL FLIP}

In following slides, all operations will be


applied on the function shown as an
example 44
Time Shift Operations
[Right or Left]

x(t ± b)

45
Magnitude Shift [ UP or DOWN]

x(t) ± c

46
Time Scale [ Compress or Expand]

x(mt)

If m > 1 then compress (fast)


If m < 1 then Expand (slow)

They're Divided by 4

47
Notes:

➢ To achieve the time scale, the important points in time domain (points where
the function value changes) have to be divided by the value of the time scaling
coefficient “m”.

➢ In the case (when the signal does not start from t = zero) for example: start at
t = ±1 , then we can not divide this point by m since this will change the start
point value and the new function will be delayed or advanced its start point
and this will be incorrect. In this case, do not include the start point with the
division by m.

➢ The most important thing here is the total width of the original function ( in
the previous example is 4) must be divided on m =2 to get the new
compressed width that is 2 (i.e. half of original one). then all sub-widths or
intervals of the function will be also be half of their corresponding in original.
In Expanding, these time points must be divided on m =0.5 to get the new
expanded width that is 8 (i.e. doubled of original). then all sub-widths of the
function will be also doubled. 48
49
Magnitude Scale [Magnify or Shrink]

ax(t) Amplify

If a > 1 then Magnify


If a < 1 then Shrink
Attenuate

50
Flip Operations (Horizontally or Vertically)

51
Magnitude Scale Time Scale
coefficient “a” coefficient “m”

Magnitude Shift
coefficient “c”

Time Shift
coefficient “b”

52
Construction of other functions using basic functions:
Other functions can be got by applying one or more of the previous
operations on the basic functions as shown in the following examples:
Example:
Plot the following functions x(t)=d(t-1), x(t)=d(t-2), x(t)=d(t+2), x(t)=3d(t-4)

53
Example:
Plot the following functions: x(t)=-2d(t+3), x(t) = d(t+2)+ d(t)+d(t-1)+ 2d(t-2)-d(t-3),

54
Example: Draw the following functions:
x(t)= u(t-1), x(t)= u(t+2), x(t)= 2u(t-4), x(t)=-3u(t+2), x(t)=2u(-t+1), x(t)=-u(-t-1)

Horizontally
Vertically Both

if it was horizontally then it


do what shall to do.

55
Ex: Draw the following functions: x(t)= r(t-1), x(t)=r(t+2), x(t)= 2r(t) , x(t)= -r(t)

56
Ex: Draw the following function: Ex: Draw the following function:
x(t)=u(t) + u(t-1) x(t)=u(t) + 2u(t-2)

57
Ex: Draw the following functions
x(t)= u(t) + 2u(t-2) -3u(t-4)

58
Ex: Draw the following function:
x(t)= u(t+2) - u(t-2)

x(t)= u(t+2) +[- u(t-2)]

59
Example: Write the mathematical functions of the functions x(t) and h(t)
shown below:

Sol:
x(t) = 2u(t+2)-u(t-2) –u(t-4) h(t) =-2u(t+1)+3u(t-1)-u(t-4)

60
Example: Draw the following function:
if x1(t)= u(t) - u(t-4) and x2(t)= 2u(t-1) -2u(t-2),
Find and plot x1(t) + x2(t)

Sol:
f(t) = x1(t)+x2(t)= u(t)+2u(t-1)-2u(t-2)-u(t-4)

61
Example: Draw the following functions: x (t)= sin(wt) [u(t-2) – u(t-5)]

Sol:
Time Window

HW: Draw the following functions:


x (t)= e-t u(-t)

62

You might also like