What happens to the frequency-spectrum if this sine-signal gets reset periodically? I asked another question an hour ago and got the feedback to to ease it up by using a sine-wave instead of a ramp function.
What happens to the frequency-spectrum if the signal gets reset periodically?
Here are the plots:




It looks to me like in picture 2 (amplitude spectrums) the green (without reset) spectrum is copied many times and the blue plot (with reset) is the sum of all the copied green ones. How can I express this in mathematical terms ?
In the process of discretization (the black and red samples are taken from the continous signals) the blue graph appears to be the derivative of the green. And again, how can this impression be formulated in mathematical terms ?
I am a little bit helpless with expression my ideas in math and hope this community can help me out :)
the script to create this plots is made with scilab 5.4 and can be found here:
http://pastebin.com/J4WF1LwL
 A: What you are essentially doing is generate (and sample) the continuous signal 
$$ 
s_R(t)=s(t)+h(t), 0<t<T,$$
where $T$ is the observation period, $s(t)=\sin(\omega_0t)$ is the "original" signal, and 
$$
h(t)\triangleq u(t;T_R)* \sum_{k=0}^{L-1}(-s(kT_R))\delta(t-kT_R) ,
$$
where $T_R$ is the "reset period", $u(t;T_R), 0\leq t \leq T_R$, is the rectangular pulse of length $T_R$, $\delta(t)$ is the delta function, and $L=T/T_R$. These (continuous time) signals are shown in the following figure:

Obviously, the Fourier transform of $s_R(t)$ equals
$$
S_R(\omega)=S(\omega)+\sum_{k=0}^{L-1}(-s(kT_R))U(\omega)e^{-j\omega kT_R},
$$
with $S(\omega)$, $U(\omega)$ the Fourier transforms of $s(t)$ and $u(t)$, respectively. From the looks of it, $S_R$ does not seem to have any periodicity properties (in general) as you suggest. Note that $h(t)$ depends on $T_R$ so it may be that for the specific value you have selected this happens, or you may have done something wrong in the calculations (did not check the code you provided). It could also be due to aliasing issues from insufficient sampling period. 
To be honest, the spectrum of the $\sin(t)$ signal you provide appears strange, I would expect visible sidelobes (due to the signal truncation in time). (Also, remember to indicate the x-axis units in your figures - it is essential for these continuous/discrete signal processing applications, as you can easily loose track if you are not careful)
The reason that your discrete signal resembles the derivative of $s(t)$ is because that these samples are actually means to approximate the derivative! Your sampling scheme obtains the value of the reset signal just before reset is applied. Note that what this sample represents is how much the signal has increased/decreased compared to the previous reset instance, i.e., you are computing $s((k+1)T_R)-s(kT_R)$, $k=0,1,\ldots$. Clearly, for small reset periods, this value is a good approximation of the (normalized) derivative of the signal (and will keep improving as you decrease the sampling period)
