# Simulation of the Micro-kinetic generator

I am simulating the block diagram of the Autoquartz system during unwinding in Simulink.

I want to get the current of microgenerator (Ibus), but I get an oscillating pattern, which you can see here .

This is the bock diagram I simulated for Tdmax = 8. Please help me how to solve my problem.

So in between the summation block with the bus voltage, and the "1/R" block, you need a block that implements rectification: $$e_{out} = \begin{cases} 0 & e_{in} < 0 \\ e_{in} & e_{in} \ge 0 \end{cases}$$
Either that, or you want to move the $$\|x|\$$ block into that spot, rather than just feeding an oscilloscope with it (and you want to remove it from the oscilloscope feed).