<< Chapter < Page Chapter >> Page >

The initial condition issue resolves making sense of the difference equation for inputs that start at some index.However, the program will not work because of a programming, not conceptual, error. What is it? How can it be "fixed?"

The indices can be negative, and this condition is not allowed in MATLAB. To fix it, we must start the signalslater in the array.

Got questions? Get instant answers now!

Let's consider the simple system having p 1 and q 0 .

y n a y n 1 b x n

To compute the output at some index, this difference equationsays we need to know what the previous output y n 1 and what the input signal is at that moment of time. In moredetail, let's compute this system's output to a unit-sample input: x n δ n . Because the input is zero for negative indices, we start by trying to compute the output at n 0 .

y 0 a y -1 b
What is the value of y 1 ? Because we have used an input that is zero for all negative indices, it is reasonable to assume that the outputis also zero. Certainly, the difference equation would not describe a linear system if the input that is zero for all time did not produce a zero output. With this assumption, y -1 0 , leaving y 0 b . For n 0 , the input unit-sample is zero, which leaves us with the difference equation n n 0 y n a y n 1 . We can envision how the filter responds to this input by making a table.
y n a y n 1 b δ n

n x n y n
1 0 0
0 1 b
1 0 b a
2 0 b a 2
: 0 :
n 0 b a n

Coefficient values determine how the output behaves. The parameter b can be any value, and serves as a gain. The effect of the parameter a is more complicated ( [link] ). If it equals zero, the output simply equals the input times the gain b . For all non-zero values of a , the output lasts forever; such systems are said to be IIR ( I nfinite I mpulse R esponse). The reason for this terminology is that the unit sample also known as the impulse(especially in analog situations), and the system's response to the "impulse" lasts forever. If a is positive and less than one, the output is a decaying exponential. When a 1 , the output is a unit step. If a is negative and greater than 1 , the output oscillates while decaying exponentially. When a 1 , the output changes sign forever, alternating between b and b . More dramatic effects when a 1 ; whether positive or negative, the output signal becomes largerand larger, growing exponentially.

The input to the simple example system, a unit sample, is shown at the top, with the outputs for several systemparameter values shown below.

Positive values of a are used in population models to describe how population size increasesover time. Here, n might correspond to generation. The difference equation says thatthe number in the next generation is some multiple of the previous one. If this multiple is less than one, thepopulation becomes extinct; if greater than one, the population flourishes. The same difference equation alsodescribes the effect of compound interest on deposits. Here, n indexes the times at which compounding occurs (daily, monthly, etc.), a equals the compound interest rate plus one, and b 1 (the bank provides no gain). In signal processingapplications, we typically require that the output remain bounded for any input. For our example, that means that we restrict a 1 and choose values for it and the gain according to the application.

Note that the difference equation , y n a 1 y n 1 a p y n p b 0 x n b 1 x n 1 b q x n q does not involve terms like y n 1 or x n 1 on the equation's right side. Can such terms also be included? Why or why not?

Such terms would require the system to know what future input or output values would be before the current value wascomputed. Thus, such terms can cause difficulties.

Got questions? Get instant answers now!
The plot shows the unit-sample response of a length-5 boxcar filter.

A somewhat different system has no " a " coefficients. Consider the difference equation

y n 1 q x n x n q 1
Because this system's output depends only on current and previous input values, we need not be concerned with initial conditions. Whenthe input is a unit-sample, the output equals 1 q for n 0 q 1 , then equals zero thereafter. Such systems are said to be FIR ( F inite I mpulse R esponse) because their unit sample responses have finiteduration. Plotting this response ( [link] ) shows that the unit-sample response is a pulse of width q and height 1 q .This waveform is also known as a boxcar, hence the name boxcar filter given to this system. We'll derive its frequency response and develop its filteringinterpretation in the next section. For now, note that the difference equation says that each output value equals the average of the input's current and previous values. Thus, the output equals the running averageof input's previous q values. Such a system could be used to produce the average weekly temperature ( q 7 ) that could be updated daily.

Got questions? Get instant answers now!

Questions & Answers

how did the oxygen help a human being
Achol Reply
how did the nutrition help the plants
Achol Reply
Biology is a branch of Natural science which deals/About living Organism.
Ahmedin Reply
what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
cell is the smallest unit of the humanity biologically
Abraham
what is biology
Victoria Reply
what is biology
Abraham
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Fundamentals of electrical engineering i. OpenStax CNX. Aug 06, 2008 Download for free at http://legacy.cnx.org/content/col10040/1.9
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Fundamentals of electrical engineering i' conversation and receive update notifications?

Ask