25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.3 Basic concepts of functions 67

Technical computing languages often have a range of built-in functions for producing

waveforms. Sometimes specialist functions are provided in a separate softwarepackage.InMATLAB

® ,thesesoftwarepackagesareknownastoolboxes.The

signalprocessingtoolboxhasafunctionforgeneratingsaw-toothwaves.Thiscanbe

accessed by typing, forexample:

t=(-2*pi:0.1:2*pi);

plot(t, sawtooth(t));

This will plot two periods of a saw-tooth wave. The first line generates a set of time

values −2π ≤t < 2πinavectorformwithaspacingof0.1betweeneachpoint.The

secondlineplotst againsttheresultofpassingthevectort tothesawtoothfunction.

The sawtooth function always produces a wave with a period of 2π. It highlights

the need to read the manual pages carefully before using a function to understand

how itwill behave.

Engineeringapplication2.3

Squarewaveform

Periodic functions may be piecewise continuous. Consider the functiong(t) defined

by

{

1 0t<1

g(t) = period = 2

0 1t<2

Thefunctiong(t)isperiodicwithperiod2.Agraphofg(t)isshowninFigure2.16.

This function is commonly referred to as a square waveform by engineers. In Figure

2.16 the open and closed end-points have been shown for mathematical correctness.Note,however,thatengineerstendtoomitthesewhensketchingfunctionswith

discontinuities and usually they use a vertical line to show the discontinuity. This

reflectsthefactthatnopracticalwaveformcaneverchangeitslevelinstantaneously:

evenveryfastrisingwaveformsstillhaveafiniterisetime.Thefunctionhasdiscontinuities

att = ...,−3,−2,−1,0,1,2,3,4,5,....

g(t)

1

–5 –4 –3 –2 –1 0

1 2 3 4 5 t

Figure2.16

The functiong(t)is both piecewise continuous and periodic.

The square waveform is often used in electronic engineering, particularly in digital

electronic systems. One example is the clock signal that is generated to ensure that

all of the digital electronic circuits switch around the same time and so remain in

synchronisation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!