How to represent the signal in above image ?
I know a ramp signal can be represented by
$$x(t) = t\cdot u(t)$$
but here amplitude of that signal is not same with $t$
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityHow to represent the signal in above image ?
I know a ramp signal can be represented by
$$x(t) = t\cdot u(t)$$
but here amplitude of that signal is not same with $t$
Try: $$ x(t) = \left[ u(t-T_{\rm on}) - u(t-T_{\rm off}) \right] \cdot \frac{T_{\rm off} - t}{T_{\rm off} - T_{\rm on} } $$
So, to explain:
The piece: $$ \left[ u(t-T_{\rm on}) - u(t-T_{\rm off}) \right] $$ will be zero before $T_{\rm on}$ and one afterwards, until $T_{\rm off}$ at which time it will be zero. Note that this assumes that $T_{\rm off} > T_{\rm on}$.
That just looks like a pulse of duration $T_{\rm off} - T_{\rm on}$ with amplitude 1.
As you said in the question, the function $-t$ has the right sign of the gradient, but (possibly) the wrong slope and (possibly) the wrong intercept. For the numbers given, $T_{\rm off} = 5$ and $T_{\rm on} = 4$, the gradient is correct but the intercept is wrong.
So, the rest of the equation just fixes that:
So
$$ 1 = m T_{\rm on} + c \tag{1} $$ $$ 0 = m T_{\rm off} + c \tag{2} $$
So that $$ (1) - (2) \rightarrow 1 = m \left( T_{\rm on} - T_{\rm off} \right) \rightarrow m = \frac{1}{T_{\rm on} - T_{\rm off} } \\ $$ and substituting that into (2) gives $$ 0 = \frac{1}{T_{\rm on} - T_{\rm off} } T_{\rm off} + c \rightarrow c = \frac{ - T_{\rm off}}{T_{\rm on} - T_{\rm off} } $$
You can represent this figure using a combination of step function and ramp function.
First check where there is a bump or step input. In your example, the step function is at t=4. you can represent it as u(t-4).Now there is a ramp function at t=4 starting at amplitude 1 which unit step u(t-4) gives. It has a slope of -1. you can find that out by finding the slope between points (4,1) and (5,0). So this ramp function is normally written as r(t). so the ramp at t=4 can be written as -r(t-4). Note that the negative sign before r is due to slope being -1. Then at t=5, the curve ends.But the ramp -r(t-4) we have considered has a slope of -1 and it keeps going on to the negative y axis after t=5.So to make it end at 5, you add a ramp with the exact slope that cancels with the slope of ramp already present. So the slope of the ramp from t=4 to t=5 is -1 . So now add a positive ramp function with a slope of +1 at t=5.i.e. r(t-5).
So the total function is y(t) = u(t-4)-r(t-4)+r(t-5)
If you want to express entire function in terms of step function, you can write
Y(t)= u(t-4)-(t-4)u(t-4)+(t-5)u(t-5).