1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

unit impulse function, unit step function, unit ramp function

Discussion in 'Mathematics and Physics' started by PG1995, Oct 4, 2012.

  1. PG1995

    PG1995 Active Member

    Joined:
    Apr 18, 2011
    Messages:
    1,681
    Likes:
    13
    Hi

    Could you please help me with the queries included in the attachment? It would be really kind of you. Thank you.

    Regards
    PG
     
  2. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    There are many many points in your post. Overall, I would say that you are thinking well, and there are many good points in there.

    Your main question seems to be about the strength of the impulse function. Here it's a matter of definition that the integrated area under the impulse function is one. When you multiply an a function by a number (for example 10), then the strength must be 10 times more. You can see this by factoring the 10 out of the integral. Then you have 10 times the integral of the delta function, which is already defined as 1. Hence, the area of 10*delta must be 10 and not 1.

    To see it another way, the width of the pusle is "a" and the height of the pulse is 10/a. Hence, when you take the limit as "a" goes to zero, the area stays at 10.
     
    Last edited: Oct 4, 2012
    • Like Like x 1
  3. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    Another point that is important that something going to zero times something going to infinity is not always one. I hope that fact is clear from the above example.

    In general, such an operation could go to zero, infinity or any constant number.
     
    • Like Like x 1
  4. dave

    Dave New Member

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


     
  5. MrAl

    MrAl Well-Known Member Most Helpful Member

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

    Hello there PG and steve,



    Q1:
    The square wave is drawn like the first illustration because it's a matter of
    graphical convenience. The second way is the more mathematically correct.
    The rise times are not shown in the pure math diagram because that's how a
    function that is discontinuous is drawn.
    The problem is not that there is no value for when the slope is infinite, the
    problem is that there are two different values you can choose to use. That
    means there's no limit to the little diagram with the slope and the error.
    So sometimes that is resolved by taking the average of the left and right
    sided limits, which of course results in a value of 1/2.

    Q2:
    The limit does not always depend on the absolute magnitude of the value, sometimes
    it depends on the rates at which the two quantities are changing.
    The impulse is set up such that it has an area of 1 and that is sort of like
    a definition. So the functions we can choose to integrate always have to have
    an area of 1. We set it up that way. If we didnt set it up that way we might
    get totally different results.
    Some things have to be defined by their rates rather than magnitude.
    One way to look at this as an after the fact, is to examine a network and look
    at it's impulse function. If we start by approximating the impulse as a pulse
    that is 0.1 seconds long we have to make it 10 volts high. If we look at the
    response it looks "a little" like the true impulse response. But if we reduce
    the time to 0.01 seconds then we have to make it 100 volts high, and if we again
    look at the impulse response of the network we see the response looks 'more' like
    the true impulse response. If we reduce the time even further to 0.001 seconds
    and make it 1000 volts high, we get a closer true impulse, and repeating this
    process when the voltage gets really high we see a network response that looks
    very very close to the theoretical impulse response. Thus as we let the
    test pulse get closer and closer to the theoretical impulse, we see the response
    of the network get closer and closer to the theoretical impulse response
    for that network.

    Also, impulses may be multipled just like step functions. If we excite a
    network with a unit step we expect to see a certain response, but if we multiply
    that unit step by 2 we would expect to see twice that response.
    For a network excited by the test pulse above with area 1, if we instead choose
    to use an area equal to 2 instead, we would expect to see the same shape of
    the response but the amplitude everywhere would be twice as high. It's as
    simple as multiplication of the signal by a constant resuting in the
    multiplication of the response by that same constant (linear network).



    These little peculiarities come up now and then in theory. Dont worry, you'll get a
    grasp of them as they start to sink in and make more and more sense, then you
    can be on your way to start to forget them and have to rethink again sometime
    in the future :)
     
    Last edited: Oct 4, 2012
    • Like Like x 2
  6. PG1995

    PG1995 Active Member

    Joined:
    Apr 18, 2011
    Messages:
    1,681
    Likes:
    13
    Thank you, Steve, MrAl.

    Here you can see my own attempt to answer the Q2 from my first post above.

    Could you please help me with these queries? I understand these are quite a few queries to ask at a time but as you see they are all related. Thank you.

    Best wishes
    PG
     
    Last edited: Oct 7, 2012
  7. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    I'll try the first 3 questions.

    Q1. They have the correct formula. Your mistake is that slope is rise over the run, and you calculated the rise incorrectly. The rise is 1/a-0 not 1/a-(-a). The value of -a is the value on the x=axis, but you need the value on the y-axis, which is zero.

    Q2. You made a mistake here. The function is not δ(0) but δ(t). Look at it again. δ(t-to) when to=0 becomes δ(t-0)=δ(t).

    Q3. For an impulse function, perhaps you can think of a hammer hitting a nail. The force applied to the nail approximates an impulse function. The details of the shape of the force over that short time probably don't have a big effect on how far the nail goes in on each strike. However, the strength of the blow is a big factor.

    Rather than thinking about switches and sensors, it's better to think about driving a system with steps and impulses. Step responses and impulse responses are used extensively in systems theory. When you know how a linear system responds to an impulse, you can calculate how that system will respond to other signals. In the lab, we can easily drive a system with a step function or a very short duration pulse (which approximates an impulse function).

    I'm not saying you can't think of switches an sensors, but you need to be careful when you visualize this way. You pointed out one problem with the sensor idea. The switch idea will fail if you think of throwing a switch in series with a voltage source. The voltage is supposed to be zero and then go to one, for example, but a switch will create a open (which is not the same as zero volts) when it is off. We could fix these problems, but why bother? Better to understand exactly what the math does and how it represents a real system.
     
    Last edited: Oct 7, 2012
    • Like Like x 1
  8. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    For Q4 ...

    I don't know why you introduce the variable tx. The expression t-to has "t" as a variable and "to" as a constant. When you take the derivative of t-to with respect to t, you get 1-0=1, because the derivative of a constant is zero The scale factor automatically factors out.

    For Q5 ...

    The author is not reversing the limits, but is instead recalculating the limits based on the variable substitution. When you substitute a variable into an integral formula, the limits need to change also. When a>0, the limits do not change sign, but when a < 0, the limits change sign because of the variable substitution. You didn't notice this when a>0 because scaling infinity or negative infinity by a positive constant still gives you the same limits. However, the same process is used in either case: a< 0 or a>0.
     
    Last edited: Oct 7, 2012
  9. MrAl

    MrAl Well-Known Member Most Helpful Member

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


    As steve pointed out, a switch is not the same as a unit step function. That's because just before the turn on time the unit step is a true 0.000 volts, whereas the switch is "open" which means any input could be driven from some other internal source. With the input at 0.000 it can not change until the unit step function decides it's time to step it up.
    Also, the step function is not always used alone. It is interesting to think about using two unit step functions, or just two step functions, one that goes positive and one that goes negative except the one that goes negative is delayed for some time after the first step occurs. If we had two steps one +2v and the other -2v, and we turn the +2v on at t=0 and the -2v step on at t=1 second, we see that at t=0 the voltage rises suddenly to +2v, and stays that way until t=1 at which time the -2v step turns on which cancels out the +2v step and so the voltage again goes to zero. So we'd see a 1 second long pulse that is at +2v amplitude. So to get rid of a unit step another unit step of equal but opposite polarity it used after a delay, and that results in a pulse. Taking this one step further, if we used another +2v step at t=2 seconds, the voltage will again go to +2v, and then if another -2v step at t=3 seconds the voltage again goes to zero, so now we've created a set of two pulses each at +2v and each lasting for 1 second, and separated by a 1 second time interval. Continuing this process with many plus and minus steps we could generate a whole pulse train. All of the steps dont have to be the same, but in PWM they are often the same for example.
    So a switch and a DC voltage source can mimic the step function but only when the switch is closed. Also, you'll find in the future that the step function is actually a pretty handy device which is MUCH easier to deal with than a switch. Right now that might not seem correct, but once you learn about the step function and related you'll wish you never saw a real switch :) no kidding, and that is because an 'open' is harder to deal with than a step because the step is completely defined whereas the switch only forces things when it is closed and when it is open it's the rest of the circuit that determines what happens at that node and that is often much harder to solve for.

    Also, the unit impulse acts as what is often called the "sampling function" because it acts as a sampler. That's the unit impulse though, not just "impulse".
    An impulse that is not unit can be thought of as a unit impulse with a gain. If you apply a unit step to a circuit and get 3.2v out at t=1 second, then instead you apply a step of 'amplitude' 2 you should expect to see the output rise to 6.4v at t=1 second. So it's as if the 'gain' had increased.
     
    • Like Like x 1
  10. PG1995

    PG1995 Active Member

    Joined:
    Apr 18, 2011
    Messages:
    1,681
    Likes:
    13
    Thank you, Steve, MrAl.

    @Steve: I have corrected Q2. Please help me with it. You can also see here my attempt at the solution of Q5. Thanks.

    @MrAl: In the quoted text below, did you mix up impulse and step? I'm asking this because you start off with impulse then in the next sentence you speak of step. I thought I better ask you if it were a typo. Please let me know. Thanks.


    Reference for Q5: http://www.vitutor.com/calculus/limits/properties_infinity.html

    Regards
    PG
     
    Last edited: Oct 7, 2012
  11. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    I think you have Q5 understood now.

    For Q2, I would answer by saying that since the impulse function is best defined and understood in terms of the limiting process of a function with an integral as the characteristic relation, the derivative that has impulses in it is best understood if you think about integrating it.

    This actually has very real application since many systems depend on the derivatives of the inputs to the system. The outputs of a system are generally found by integration of the system state variable equations. Hence, since a unit step function and square waves are very common input signals. There is a real need to integrate the derivatives of abrupt transitions, in practical systems. You now have the tool to do just that.
     
    Last edited: Oct 7, 2012
  12. PG1995

    PG1995 Active Member

    Joined:
    Apr 18, 2011
    Messages:
    1,681
    Likes:
    13
    Thank you, Steve.

    Could you please elaborate on what you said above? Thanks.

    I think by the part "understood in terms of the limiting process of a function with an integral as the characteristic relation", you mean this (Δ(t) is a rectangle function):


    [​IMG]



    @MrAl: In the quoted text below, did you mix up impulse and step? I'm asking this because you start off with impulse then in the next sentence you speak of step. I thought I better ask you if it were a typo. Please let me know. Thanks.

    Regards
    PG
     
    Last edited: Oct 8, 2012
  13. MrAl

    MrAl Well-Known Member Most Helpful Member

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

    Well yes and no at the same time :)
    That's because they both work the same. If you think of the unit impulse with a gain it's just an impulse, if you think of a unit step with a gain it's just a step. I like to compare the unit impulse and the way it scales to a unit step and the way it scales because i think you are more familiar with the unit step and a general step. So if you think about how the unit step scales, you can apply that to how the unit impulse scales. When applied to the input of a network, it just creates a higher valued output.

    The function under the integral used to 'generate' the impulse does not have to be a rectangular function, it can be a triangle for example, but can really be almost anything. Probably has to be symmetrical about the y axis, so anything that follows that rule should probably work, like a tall ellipse for example. The rectangular function is just easier to integrate :)

    Might i suggest that you do a few simulations. Start with a simple filter like an RC low pass filter, calculate it's impulse response and plot it vs time, then using the simulator excite it with the following pulses that start at t=0:
    1. 1v high and 1 second pulse width
    2. 10v high and 0.1 second pulse width
    3. 100v and 0.01 second
    4. 1000v and 0.001 second
    5. etc.
    6. 1000000v and 1/1000000 second pulse width

    Compare the output of the RC filter to the calculated impulse response for each variation above.
     
    • Like Like x 1
  14. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    Rather than elaborate, I'll try to answer Q2 again. Looking at what I wrote, i see it is worded in a confusing way. I was actually trying to say something relatively simple. Basically, I am saying that if you know what an impulse function is, then the meaning of impulses in the derivative of a function with steps in it is clear, especially when you integrate the derivative function.

    So, let's state your Q2 again.

    There are probably many ways to try and answer this question because it is a little open ended.

    One way to answer is to say that these results indicate that the function we are taking the derivative of can be represented as a limiting form of other functions. For example, a step function can be represented as

    u(t)=0 for t<-a/2, u(t)=1 for t>a/2 and u(t) =t/a otherwise

    This becomes a unit step function in the limit as "a" goes to zero, and it's clear that this form gives a rectangular impulse function as the derivative.

    However, just as with the impulse function, there are other functions that can be used to represent the step region near t=0.

    This idea of thinking of shapes is for our visualization only. The true impulse function is characterized by the act of integration, and there is no real shape to the function.
     
    Last edited: Oct 8, 2012
    • Like Like x 1
  15. PG1995

    PG1995 Active Member

    Joined:
    Apr 18, 2011
    Messages:
    1,681
    Likes:
    13
    Thank you, MrAl, Steve.

    I like this description more. Personally, I think of an impulse as a value extractor. It extracts a value of a continuously varying function at some particular instant of time. A unit impulse will extract the value as it is but an impulse which is not unit would amplify the extracted value; if it's >1 then it will amplify and if it's <1 then de-amplify. I don't know if this notion of an impulse is too much 'incorrect' or can suffice for sometime. Perhaps, you can tell me better. Thanks.

    Let me have a chance to mutilate my own query with my own ignorance! :) My personal notion of δ(t) is that it stands for an infinite slope. Suppose a unit step rises from 0V to 1V within 10^(-18) seconds. It's slope would be, (1-0)/10^(-18), and let this slope be represented by δ(t). Now consider a step with the magnitude of '2', i.e. 2u(t). It rises from 0V to 2V within the same 10^(-18) seconds and therefore it's slope would be doubled, and this doubled slope could be represented by 2δ(t). The same arguments goes for 3δ(t), 4δ(t), etc. Once again, I don't know if this notion of an impulse is too much 'dangerous' or can work for sometime. Thanks.

    Regards
    PG
     
    Last edited: Oct 9, 2012
  16. MrAl

    MrAl Well-Known Member Most Helpful Member

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


    Let me see if i can add some perspective to your understanding of the impulse. I'll use a little analogy.

    You run across a person who has never seen a window before (like a window for a house or garage). You hand them a brand new window that is 2 feet wide and 4 feet high. What do they do with it? They dont know what a window is and never saw one before. Then you state out loud that the size is 2 feet wide and 4 feet high. Do they care? They dont know what it is anyway because they just saw one fore the first time. And then you go on to tell them that there are other windows that are bigger, like 3 feet wide and 5 feet high. What do they make of it? They dont know what it is anyway, or what it is used for, so they have no understanding of what the difference between the two window sizes means.

    Then one day they come across a house just being built (chuckle) and they see that the window fits in one of the holes in the side of the house. It was the bigger window that fit, not the smaller one, but now they see what the difference in size means too.

    So the moral of the story is that the object does not stand alone but works with other objects and together they form a system of sorts. Having that one object alone does no good at all, for it has no use standing alone. But as soon as it is matched to it's purpose, it all falls into place.

    The impulse fits nicely into the area of circuit analysis. It doesnt do anything on it's own. It plays with other things like circuits and transforms. So as soon as you start to use the impulse for various circuit analysis techniques, it's usefulness will mean a lot more and so will the 'gain'.
    I used the term 'gain' also because that's how it looks in an equation like for example:

    y/2=0.5*t+δ(t)

    and in solving for y here we might multiply both sides by 2 and get:
    y=t+2*δ(t)

    so there's the gain again. It's just a multiplier that says something more than just δ(t) alone. It says that later on in the analysis we will end up with two times more of something than when we didnt have that '2'.

    Now when we go to transform this into the frequency domain, we get:
    y(s)=1/s^2+2 [the 't' in the above equation transforms into 1/s^2]

    because curly delta (t) transforms into a constant. Here it had a multiplier of 2 so the constant was 2, but if it had a multiplier of 3 then the constant would have been 3, or with no multiplier then the constant would have been 1.

    You probably already know that the derivative of the step function is the impulse function, and so the integral of the impulse function is the step function. So if we had an impulse response for a circuit we could integrate it and get the step response. If we had the step response we could take the derivative and get the impulse response.
     
    Last edited: Oct 10, 2012
    • Like Like x 1
  17. PG1995

    PG1995 Active Member

    Joined:
    Apr 18, 2011
    Messages:
    1,681
    Likes:
    13
    Hi

    Some of the information on Kronecker delta function can be found here although for this discussion you don't need to refer the linked thread.

    Let me repeat what I said above. Personally, I think of an impulse as a value extractor. It extracts a value of a continuously varying function at some particular instant of time. A unit impulse will extract the value as it is but an impulse which is not unit would amplify the extracted value; if it's >1 then it will amplify and if it's <1 then it will de-amplify. In this context I was referring to Dirac delta function.

    Now there is a related beast called Kronecker delta function for discrete time functions. First of all, I don't get where it's used. Theoretically speaking, is it used to extract value of discrete time functions? If not, then where it's used. For continuous functions, the Dirac delta is used where it samples the value of continuous varying function. Please help me with this. Thank you.

    @MrAl: What you say above is correct that when different things come together and work as a system then we get full understanding and appreciate their usefulness.This is true that studying about different topics in isolation makes things really difficult. But that's the way things are taught and this is how 'formal' education goes, at least where I live. Using your analogy. I have a window and I know it will be used someday. I need to know its properties before I see its real use. I can't wait for the day when I actually see it being used/fixed in some house. They are going to ask me about its properties, size, dimensions, etc. in an exam. It's possible they will ask me about different kinds of windows and it's quite possible they will ask me to show them how it's fixed in a frame although I haven't seen it being fixed. This world is a cruel place! :(

    Regards
    PG
     
    Last edited: Oct 14, 2012
  18. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    In order to help speed up your comprehension of the answer to this question, I would like you first to express mathematically how the Dirac delta acts as a value extractor. I think your description is correct, but this needs to be more than words. Please show how this works.

    I would say you are correct and once you show how the Dirac delta function is used to achieve "value extraction", it will be easy for us to show you now the Kronecker delta does the same for discrete time functions.
     
    Last edited: Oct 14, 2012
  19. MrAl

    MrAl Well-Known Member Most Helpful Member

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

    Hi again,


    All i was trying to say was that some things dont make sense until you go to actually use them, and then they make really good sense :)

    Seeing your great interest in this leaves me with no doubt that you'll soon have a good handle on all this 'impulse' stuff.
     
    Last edited: Oct 14, 2012
  20. PG1995

    PG1995 Active Member

    Joined:
    Apr 18, 2011
    Messages:
    1,681
    Likes:
    13
    Thank you for the reply.

    Actually I should have shown mathematical description of it in the first place. Here it is:

    [​IMG]

    Now please help me. I know there exists a sigma notation for the Kronecker. I think of an impulse as a kind of device which can extract the values of time varying quantity. For instance, a mechanism can be implemented where a sensor turns on after a fixed amount of time to sense temperature in a room. I know you aren't a fan of this sensor example but at this level I can't think of anything better. Thank you.

    Regards
    PG
     
    Last edited: Oct 15, 2012
  21. steveB

    steveB Well-Known Member Most Helpful Member

    Joined:
    Jan 16, 2009
    Messages:
    1,307
    Likes:
    638
    PG,

    OK, very good. You correctly show that the Dirac delta is a value extractor when used inside an integral. The notation δ(t-to) indicates that the peak in the delta function is shifted to the location of t=to, and the function value at g(to) is extracted by this process of integration. The reason why this works is that the Dirac delta is defined to have an integrated area of 1, and then the value of g(to) scales the area to the value of g(to). It's actually very simple in principle, but the integration and the use of this weird Dirac delta function, which is not a traditional function, make the conceptual understanding somewhat difficult. So, good job in getting this concept down.


    Now the corresponding operation in discrete time is conceptually much simpler. First, the Kronecker delta is a simpler object since δ[n-no] is a function of integer values only, and the value is zero for every integer except n=no, where the value is one. Note that there is no infinity or weirdness to deal with. This function is a true function. So, value extraction using a summation is very easy to understand, as follows.



    This works because the Kronecker delta is zero for every "n" not equal to "no". So, the entire summation over an infinite number of values gets reduced to one number as follows.



    The above must be true because δ[0]=1, by definition.

    It's as simple as that. Examples like these are why I previously recommended trying to understand the discrete time math without drawing from the continuous time math. Basically, the discrete time version is very much simpler to understand, and drawing from the confusing aspects of continuous time math can sometimes make the whole thing seem more difficult.

    What can be simpler than taking a string of numbers, multiplying one of those numbers by 1, and then multiplying the rest of the numbers by 0, and then adding all the resulting numbers together? Obviously, the answer will be equal to the original number you multiplied by 1.
     
    Last edited: Oct 15, 2012
    • Like Like x 1

Share This Page