# System analysis Sampling and reconstruction

Discussion in 'Mathematics and Physics' started by noel_t, Jan 28, 2014.

1. ### noel_tMember

Joined:
May 31, 2011
Messages:
46
Likes:
0
Dear friends,

I would like to ask for you help to come out with an accurate answer for the following two (2) tasks.

1- System analysis
2- Sampling and reconstruction

File size:
268.5 KB
Views:
149
2. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,049
Likes:
961
Location:
NJ
Hi,

I'll help get this started...

The difference equation:
y[n]=x[n-1]+y[n-2]/4-4*x[n-2]

The circuit redrawn:

Code (text):
x[n] o-->--+---->-----+
|          |
-4          |
|          |
(+)--T-->--(+)--T-->--+-->--o y[n]
|                    |
+---<-----1/4--------+

(+) are summing junctions

Last edited: Jan 29, 2014
• Like x 1

Joined:
May 31, 2011
Messages:
46
Likes:
0
thanks

Joined:
Jan 12, 1997
Messages:
-
Likes:
0

Joined:
May 31, 2011
Messages:
46
Likes:
0

6. ### steveBWell-Known MemberMost Helpful Member

Joined:
Jan 16, 2009
Messages:
1,307
Likes:
639
I'd like to make an overall general comment about this question. I find it hard to help you without knowing your background. Please provide some context of what text books you are using, and what analysis tools you are expected to use when solving these problems. There are too many different approaches to deal with these questions.

For example, have you learned any of the following.

1. State space analysis or at least state space representation of systems.
2. Signal flow graphs for linear systems ( can you make one and then find transfer functions)
3. If you dont use signal flow graphs, what methods do you use for solving linear equations and finding transfer functions.

Another difficulty is that the text provided strikes me as a little different than most text books I'm familiar with, and there is mention of the "area in z-space and 1/z space" which is unclear to me. So providing the text book name and even some scans of relevant pages would help us (or at least would help me). Or, you can maybe just describe what you do know about solving these problems and exactly where you are having trouble.

I point these things out so that you will understand why you have not received a lot of feedback in this thread. It's not that no one other than MrAl wants to try to help, but there is a bit of an art to presenting questions in a way the helps the helper, so to speak.

7. ### noel_tMember

Joined:
May 31, 2011
Messages:
46
Likes:
0
thanks for the response. "Discrete Time Signal Processing by Alan V.Oppenheim , Ronald W.Schafer & John R.Buck" is introduced by the professor as a reference or any other DSP book.
My specialization is "Electrical power engineering" and unfortunately I have to come out with the results of this tasks in 10 days and it made for me too difficult and I am exchange student in this new place. So I hope someone can help me.

8. ### steveBWell-Known MemberMost Helpful Member

Joined:
Jan 16, 2009
Messages:
1,307
Likes:
639
OK, I'll take a shot at this. I do have that Oppenheim books, so I have a sense of what you should be able to understand. I don't think that book stresses state-space approach nor the use of signal flow graphs, so I'll try to avoid those approaches, or clearly define any aspects of them that are needed.

To keep things clear, I'll address each section of the question in a separate post.

Q1.1

MrAl already gave you the answer, but let's talk about how to find it in more general terms. The approach I like is to write out equations for all of the inputs of the delay elements (T). The output of the delay element will be a variable like w1[n] and the input of that same delay element would be w1[n+1]. If there is more than one delay then you can label them as w2, w3, etc. or you can use any unique names you prefer.

Then for every delay element you write an equation for the input of the delay element (e.g. w1[n+1]) in terms of the input variables x[n], x1[n] ... etc. and the state variables w1[n], w2[n] ... etc. Then you can write your output variables y1[n], y2[n] ... etc. in terms of the inputs and the states.

So let's apply this to this example. The variable y[n] is the output variable, and it is also the output of a delay element. The other delay element can be be labeled as having an output w[n] and input w[n+1]. So the state equations are as follows.

y[n+1]=w[n]+x[n]
w[n+1]=0.25 y[n] - 4 x[n]

Now to get y[n], just delay the first equation by one delay and get y[n]=w[n-1] + x[n-1]

Then delay the second equation by two delays and get w[n-1]=0.25 y[n-2] - 4 x[n-2]

Then substitute w[n-1]=0.25 y[n-2] - 4 x[n-2] into y[n]=w[n-1] + x[n-1] to get y[n]=0.25 y[n-2] - 4 x[n-2] + x[n-1], which I think matches MrAl's answer.

Last edited: Jan 30, 2014
• Like x 1
9. ### steveBWell-Known MemberMost Helpful Member

Joined:
Jan 16, 2009
Messages:
1,307
Likes:
639
Let's go to the next part of the question ...

Q1.2

There are different ways to derive the transfer function. I dont know which you prefer but let's transform the difference equation and solve for H(z)=Y(z)/X(z).

You start with y[n]=0.25 y[n-2] - 4 x[n-2] + x[n-1] and then transform it. Transforming a difference equation is easy because every delay in time becomes a multiplication by 1/z. Also, addition and multiplication (edit: multiplication by a constant, not multiplication of variables) operations transform directly. So, we get Y(z)=0.25 Y(z)/z^2 - 4 X(z)/z^2 + x(z)/z. Now, do some algebra to solve for H(z)=Y(z)/X(z). You should be able to do this last step, but I'll write out the answer because it is needed later to answer other parts of the question.

H(z)=( z - 4 ) / ( z^2 - 1/4)

Last edited: Jan 31, 2014
• Like x 1
10. ### steveBWell-Known MemberMost Helpful Member

Joined:
Jan 16, 2009
Messages:
1,307
Likes:
639
Q1.3

Here is where I need some feedback from you. I don't know what it means when it says "take the the appropriate area in z-space". Do you know what this means?

Without knowing perhaps I'm telling you the wrong way, but taking inverse transforms is easy if you first do a partial fraction expansion of H(z)=( z - 4 ) / ( z^2 - 1/4), and then use a transform table to get back to the time domain and find h[n]. I'll assume you can do this and this approach is acceptable. Let us know if you need help with this with either a different approach, or show us where you are getting stuck with this approach.

Last edited: Jan 30, 2014
• Like x 1
11. ### steveBWell-Known MemberMost Helpful Member

Joined:
Jan 16, 2009
Messages:
1,307
Likes:
639
Q1.4

I hope you can answer this question yourself because it involves the definition of 'impulse response"

Q1.5

This is easily answered from the answers in Q1.4 and Q1.1. If you have any trouble with this, post your work and we will guide you.

Q1.6

This is also straightforward once you have the answers from Q1.5 and Q1.3. If you have any trouble with this, post your work and we will guide you.

Q1.7

Q1.8

You should know how to answer this from rules in your text book. I'll try to highlight the rule I know from memory. Keep in mind that I could be wrong because I'm old and forgetful now. So, it's your responsibility to check me and don't blame me if you get a wrong answer because of my bad advice. I'm just trying to give quick guidance here.

Is the system ...

a) ... stable?
Stability is dictated by pole placement. If all the poles are inside the unit circuit, it's stable. If any are outside, unstable. If on it with none outside, it's marginally stable.

b) ... minimal-phased? I seem to remember a rule for causal systems about the zero's must be in the unit circle for minimum phase

c) ... causal? The time domain impulse response makes this clear and h[n] must be zero for n<0, for a causal system.
d) ... and all-pass? All pass filters have unity gain magnitude for all frequencies but the phase response can be anything. The gain and phase responses occur for values of z on the unit circle.

Last edited: Jan 30, 2014
• Like x 1
12. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,049
Likes:
961
Location:
NJ
Hi again,

Steve:
Yes when the questions are not clear or when there is some question about what the OP is asking for i like to post a brief message to try to provoke more questions and possibly get more background information. Luckily you have the book so you can help more here. I'll just make a note of how easy it is to find the difference equation, although i do have to ask the OP how the instructor expected him/her to do this on their own. Did the instructor just hand them the book for the first time and say "do this" or what, cause that is what it almost sounds like ha ha.

For the solution to the difference equation we have a very simple flow graph (from the first message and redrawn in my first reply) where there are no inner feedback loops, so the solution for the output relies solely on the sum of the path transmittances. We have only three paths:
1. The "right' side from x[n] to y[n].
2. The 'left' side from x[n] to y[n].
3. The 'bottom' from y[n] back to y[n].

This makes it quite easy to get the equation for y[n] as we just follow these paths and write down whatever we encounter in the proper terms.
1. For the right side, we see the path start at x[n] and go through one delay T before it reaches the output y[n], so we get simply x[n-1].
2. For the left side, we see the path start at x[n] again and go through one gain -4 so we get -4*x[n], then go through one delay T so we get -4*x[n-1], then through another delay so we get -4*x[n-2].
3. For the bottom, we see the path start at y[n] and go through a gain of 1/4, so we get y[n]/4, then through one delay so we get y[n-1]/4, then through another delay so we get y[n-2]/4.

Summing all these, we get:
y[n]=x[n-1]-4*x*[n-2]+y[n-2]/4

This method might be called "The Path Transmittance Summation Method" but it's really like Mason's Flow Graph Gain Formula except that the method relies on there being no inner loops so before we start we have to reduce all the inner loops to single gain paths using the feedback rule for flow graphs. This usually isnt hard to do and many times we dont even have any inner loops.
In spite of this simplicity however, i still would like to refer the OP to Mason's Flow Graph Gain Formula which is a very ordered way of doing things.

From there to get the transform we simply replace every [n-k] with a multiplication of z^-k and then solve for Y/X as Steve pointed out. We then simplify the equation.

From the limited text i would think that the phrase "z space" simply means any space found in the z plane. This might include a rectangular shaped sub space, triangular space, circular space, or just about any shape; the unit circle would enclose a circular shaped sub space for example.

• Like x 1
13. ### steveBWell-Known MemberMost Helpful Member

Joined:
Jan 16, 2009
Messages:
1,307
Likes:
639
MrAl,

I agree with everything you said.

In my brief description of a recommended way to derive the difference equation, I didn't try to explain too much. That method is particularly powerful because it allows derivation of state space equations in a systematic way. The nice thing about that approach is that it works for just about any block diagram we might encounter (there are always exceptions, of course) even if they are nonlinear. Signal flow graph approaches in the frequency domain for linear system, or quick approaches for special cases are certainly valid and useful. but, they may not always apply. In those more difficult cases one is well served with a state space methodology.

It's not clear to me that the OP is familiar with the state space system analysis for either linear or nonlinear systems. So, I don't want to go too much down this path. However, trying that approach will begin embarkation down the path of understanding state space viewpoints, and will provide preparation for the day when the state space approach is presented formally.

noel_t

By the way, the method I suggested can be applied to continuous time systems too, but in that case you will have integrators, rather than delays in the block diagram. Hence you would write equations for the derivatives of the integrator outputs (i.e. the input to the integrator), rather than writing equations for the input of the delay element. This would produce a set of differential equations, rather than difference equations. For linear systems, it would then always be possible to make one higher order differential equation from the many first order differential equations. Again, you may not be studying this yet, but if you are not, just keep this stuff in the back of your mind for later.

Last edited: Jan 31, 2014
• Like x 1
14. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,049
Likes:
961
Location:
NJ
Hi again,

I dont think i can say the same for Mason's, but I thought "Path Transmittance" was pretty general. I like to see other methods here too anyway.

My only DSP book was written in the 70's unfortunately so some of it may be out of date. I used that book many times but rarely these days. Also back then it was not common to provide the answers to problems in the same book as they do today with many textbooks. My take on this is that anyone can ask a question, it takes a dedicated author to provide worked out solutions.

15. ### steveBWell-Known MemberMost Helpful Member

Joined:
Jan 16, 2009
Messages:
1,307
Likes:
639
Yes, Mason's Rule is a linear system rule. The basic signal flow graphs with nodes and transmittances are inherently linear, but you can make more general nonlinear flow graphs. I'm not up on all the techniques, but one thing you can add to the mix is a multiply operation where two or more signals multiply together to create a new signal. About a year ago I read a paper that did that to display a system. That actually makes a very nice picture view. I'm not aware of any general formula rule for those types of graphs, but you can sometimes use the same method I outlined for the block diagram to generate nonlinear state space equations if there are integrators (continuous time systems) or delays (discrete systems). I'm not really sure how to show more complex nonlinearities with a signal flow graph in general, but it would not surprised me if there are ways to to that. However, my experience is that most people use block diagrams for nonlinear systems.

16. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,049
Likes:
961
Location:
NJ
Hi again Steve,

Yes multiplications may become necessary and also time dependence, as in a nonlinear predator-prey model or spread of infectious disease. That would just introduce multiplications of two or more variables or introduce time dependent coefficients. I guess that is why you were not happy with simply "transmittances". I can see how that could sound misleading because many flow graphs are simple linear.