I have a clock with a time period of 1 ms. I want to generate a signal which has the following characteristics:
Some \$\hat a = 3.7, \delta = 0.1\$ . At a particular clock cycle, the signal must have a voltage which is from the uniform distribution \$[\hat a -\delta,\hat a + \delta]\$. Say this value is \$a_1\$. At the next clock cycle, the voltage \$a_2\$ must be such that \$a_2=2\hat a-a_1\$. This will give the average voltage in two clock cycles always equal to \$\hat a\$, which helps me a lot with my analysis
The first part of getting a value from uniform distribution is easy. How do I do the second part? Is there any way to write a loop in PWL such that the first voltage will be chosen randomly from the interval, and the second will be as given in the above condition, and this is repeated forever? I have no idea about the concept of memory in LTspice.