# Determine impulse resonse of First Order Hold (FOH)

Question, how can I determine the impulse response function of a first order hold? On Wikipedia it is simply stated as:

$$h_{\mathrm{FOH}}(t)\,= \frac{1}{h} \mathrm{tri} \left(\frac{t}{h} \right) = \begin{cases} \frac{1}{h} \left( 1 - \frac{|t|}{h} \right) & \mbox{if } |t| < h \\ 0 & \mbox{otherwise} \end{cases} \$$

But given it's implementation $$f(t) = f(kh) + \frac{t - kh}{h}(f((k+1)h) - f(kh)) \text{ with }kh \leq t < (k+1)h$$

how do I obtain $$h_{FOH}(t)$$?

--edit--

So if $$f(kh)=δ(0)$$ for $$k=0$$.

For $$k=−1$$, e.g., $$−h≤t<0$$ we get $$f(t)=f(−h)+\frac{t+h}{h}(f(0)−f(−h))$$ combined with $$f(−h)=0$$ this results in $$f(t)=\frac{t+h}{h}\delta(0)$$.

For $$k=0$$, e.g., $$0≤t we get $$f(t)=f(0)+\frac{t}{h}(f(h)−f(0))=δ(0)−\frac{t}{h}\delta(0)$$.

So we get $$h_{\mathrm{FOH}}(t)\,= \begin{cases} \frac{t + h}{h} \delta(0) & \mbox{if } -h \leq t < 0 \\ \delta(0) - \frac{t}{h} \delta(0) & \mbox{if } 0 \leq t < h \\ 0 & \mbox{otherwise} \end{cases}$$

what then follows, is that you have to "see" that this equals the formula with $$\text{tri}$$ function, as at the start of this message.

clear all;
close all;
clc;

h = 0.01;
t = -1:h:1;

for i = 1:length(t)
if -h <= t(i) && t(i) < 0
y(i) = (t(i) + h) / h;
elseif 0 <= t(i) && t(i) < h
y(i) = 1 - t(i)/h;
else
y(i) = 0;
end
end

fohImpl = @(t,h) triangularPulse(t/h);

figure(1);
plot(t,y);
hold all;
plot(t,fohImpl(t,h));

• Where did you get the second expression? It looks like the definition of a second-order hold. Commented May 12, 2020 at 22:27
• @TimWescott, mathworks.com/help/control/ug/…
– WG-
Commented May 12, 2020 at 22:44
• D'oh -- I got my orders confused. 30 years in engineering, and I still can't count. Commented May 13, 2020 at 1:59
• it's not second-order. there are different competing definitions of the FOH in the Wikipedia article. it appears to me that the "implementation" depicted by WG is this one. Commented May 13, 2020 at 4:30

Hint:

$$f(t)$$ is the expected output after passing a sampled function through the first order hold function with impulse response $$h_{FOH}(t)$$.

The sampled function is $$f(kh)$$, with $$k$$ being the sample index and $$h$$ being the sample interval, with zeros elsewhere as a continuous time process. The output is the continuous-time convolution of $$f(kh)$$ with $$h_{FOH}(t)$$. In the first-order hold, $$h$$ is also the duration of the hold time, so spanning one sample interval.

If $$f(kh) = \delta(0)$$, with $$k=0$$, which is the unit impulse at time $$t=0$$, the result should be the impulse response, $$h_{FOH}(t))$$.

• I am sorry but I need a little more help then a hint. This isn't an assignment, I simply want to know the answer.
– WG-
Commented May 13, 2020 at 0:47
• @WG- Happy to help! Where are you stuck? Use an impulse for $f(kh)$ in the second equation and you get the first equation. Did you try? Commented May 13, 2020 at 0:52
• So if $f(kh) = \delta(0)$ for $k=0$. For $k = -1$, e.g., $-h \leq t < 0$ we get $f(t) = f(-h) + \frac{t + h}{h}(f(0) - f(-h))$ combined with $f(-h) = 0$ this results in $f(t) = \frac{t + h}{h} \delta(0)$ For $k = 0$, e.g., $0 \leq t < h$ we get $f(t) = f(0) + \frac{t}{h}(f(h) - f(0)) = \delta(0) - \frac{t}{h}\delta(0)$. So we get $$h_{\mathrm{FOH}}(t)\,= \begin{cases} \frac{t + h}{h} \delta(0) & \mbox{if } -h \leq t < 0 \\ \delta(0) - \frac{t}{h} \delta(0) & \mbox{if } 0 \leq t < h \\ 0 & \mbox{otherwise} \end{cases} \$$
– WG-
Commented May 16, 2020 at 13:59
• (funny the mark-up shows up now). Yes I see now, very good. I got caught up on not seeing that $\delta(0)$ is simply 1 regardless of $t$. For example $f(t) = \delta(0)$ is the same thing as saying $f(t) =1$.. Commented May 16, 2020 at 17:15
• Thanks for your help though. It was actually a lot easier, I was simply thinking far to complex. I accept the fact that coming to the conclusion that you can reformulate it to the $\text{tri}$ function is mere algebra.
– WG-
Commented May 16, 2020 at 17:34