# Heavy-side step function

1. Aug 9, 2005

### EvLer

heaviside or step function

I don't quite understand how to add step functions and would like to get that down before this one class begins.
Does anyone know a good tutorial or a helpful site or a book with answers?
Thank you.

Last edited: Aug 9, 2005
2. Aug 9, 2005

### mathmike

can you be a little more specific

3. Aug 9, 2005

### EvLer

ok, for example, how do I graph this equation:
V(t) = 2r(t-2) - 2r(t-6) - 8u(t-8)
some of them I do understand, like this one, but i don't have a good grasp on them. Actually, to be precise it's not just the unit step functions, but also ramp functions.

ps: the class is on signals, laplase transforms, etc. but i think this topic is more of mathematics concept rather than engineering.

4. Aug 10, 2005

### uart

The first thing you need to do is define r(.)

5. Aug 10, 2005

### BobG

r(t) is the integral of the step function u(t). In other words, it's the area under the step function. It's graph is a ramp whose slope matches the amplitude of the step function (in this case, 2r(t-2), 2r tells you the amplitude of the original step function was 2. The ramp function r(t) is a ramp with a slope of 2.

At first, it sometimes helps to plot it out for different times to get a feel for what's going on. That's about the only way to really get a grasp on it, early on. Once you get a feel for it, it gets pretty easy to just look at it and visualize what's happening.

For example, 2r(t-2) means that starting at 2 seconds, you have a ramp with a slope of 2. At 6 seconds, you start subtracting a ramp with a slope of -2 from your first function, which is still in effect. By 6 seconds, your ramp has reached 8 on the y-axis. From 6 seconds on, the 2r(t-2) and -2r(t-6) are cancelling out, meaning your amplitude stays flat at 8. At least until 8 seconds, when the -8u(t-8) turns on. Now you have to subtract 8 from the result of your first two functions (which has been steady at 8 between 6 seconds and 8 seconds). That means your last function returns you back to zero.

Edit: the signs on my slopes were backwards.

Last edited: Aug 11, 2005
6. Aug 10, 2005

### HallsofIvy

By the way, it is not "heavy-side" function! It is "Heaviside" function, named for Oliver Heaviside (1850-1925).

7. Aug 10, 2005

### EvLer

sorry...
by your reaction i assume this is a common mistake, I did notice that and edited my post that same day, but it did not show up in the thread title on thread menu level...
Thanks for replies. BobG, thanks for the explanation...yeah, i need practice.
I did find something in my diff eq-s textbook, like a half of a page, but if someone knows of a good resource that would be greatly appreciated. Basically addition and multiplication of unit and ramp functions.

Last edited: Aug 10, 2005
8. Aug 11, 2005

### EvLer

OK, more concrete examples [this is not HW, this is practice problem for my own understanding]:

f(t) = 2r(t) - r(t - 2) - r(t - 4);

the part that I have a trouble with is subtracting a ramp function with a different magnitude.

f(t) = 2u(t)u(4 - t) + r(t);

and with this one, I am not even sure where to begin, I know that first part is probably a ramp function actually but does it start at x = 4?

Any help is very much appreciated.

Last edited: Aug 11, 2005
9. Aug 11, 2005

### BobG

The idea of step functions is that you draw how you want the output signal (or function) to look on a piece of graph paper, then come up with an equation to describe that. As a result, step functions and ramp functions are more pragmatic than based on a deep mathematical relationship.

There's only one part you have to worry about on the ramp functions: the slope. The t (or t-0), the (t-2), the (t-4) just gives you the start time for each function (in electrical circuits, they like to use ramp and step functions to represent a switch opening or closing at a certain time or an enabling/disabling signal or pulse being received at a certain time).

You have a slope of 2 for awhile. When the next switch closes, you have to subtract 1 from your slope (1*r(t-2)). You're still at the same point on the graph, but the slope has changed to one.

On the step functions, the amplitude is the only thing you actually do any addition or subtraction on - the (t-x) part just tells you when the switch closed to turn on the function.

Of course, the exception is when a switch opens, turning off the function. Mathematically, it's hard to come up with an expression that closes a switch, then opens the switch. Instead, you might see 3u(t-2) to represent the switch turning on the function at 2 seconds; and then a -3u(t-6) to represent a switch turning on a function that undoes the first function. In reality, at 6 seconds, you're doing the opposite of what you did at 2 seconds, or you're 'un-turning on' the function at 6 seconds.

The step functions are actually harder. There's a possibility you could have a jump depending on what's defining the amplitude of your step function. For example, if you had $$t^2u(t-2)$$ as your step function, the function would turn on at 2 seconds, but the $$t^2$$ would go into effect immediately, meaning your amplitude would be 4 as soon as the function turned on, and then continue with the rest of the parabola. (That might be what you wanted your output signal to look like, but that would be unusual).

Edit: Does your second one have a typo? Until 4 seconds, you're multiplying 2*0. You could do that, but you could do the same thing with just -2u(t-4). Or are they just going to pains to illustrate the different properties of step functions?

Edit: Actually, there is a reason for writing the second equation the way they did. It might better represent what's actually happening in the circuit. The "2" might be available on the input side immediately, but not go anywhere until the inverter is turned on at 4 seconds. So there is a point in presenting it as 2u(t)u(4-t), even though it simplifies to -2u(t-4).

Last edited: Aug 12, 2005
10. Aug 15, 2005

### EvLer

could you show/describe a little more to me what that looks like? if it were subtraction of the same magnitude, I get it, but different magnitude
I think once i get the general idea, i'll be fine. I understand the (t-x) part. I just can't get a hang of subtraction/addition/multiplication with respect to magnitudes for some reason...

Thank you, BobG, very much for helping.

edit: ok, i think i got the first one: it's just y = 2x till x = 2 and till x = 4 it's slope is 1, from x = 4 it is flat.

so, for the second one with 2u(t)u(4-t) what are the steps to simplify it to -2u(t - 4). Is it correct to pull the minus out from the parenthesis of the interval? and if another step function is multiplied by u(t) that is equivalent to multiplying that function by 1, correct?

Last edited: Aug 15, 2005