# simulating switch capacitor resistor

Status
Not open for further replies.

#### Usman Hai

##### Full Member level 3
Hi. I am simulating the switch capacitor circuit to realize a resistor (say). The operation is as follows: On phase phi1, V1 is sampled across capacitor C. The next overlapping phase phi2, V2 gets sampled. The difference of these voltages causes the current flow. Its all quite simple.
When I simulate with all the ideal components in spectre, I get current spikes at the switching time instants. In books it is said that average current will flow between V1 and V2. Now my question is how to find this average current. There are just spikes of current (these spikes, I assume, are perfectly fine).
My actual aim is to use this switched cap resistor inside a continuous time circuit to say bias point of something. So that when switching frequency increases I will get higher current.
Regards,

#### LvW

The average current is determined by the spikes; however it is hard to measure resp. simulate it. You can, for instance, increase the resistance of the switch with the result of broader spikes.

But the best and most illustrative way is to simulate the SC part within the whole circuit. In most cases the voltage V2 is identical with the inverting terminal of an opamp (virtual ground) - resulting in a charge transfer from the switched C to the feedback hold capacitor.
LvW

#### Usman Hai

##### Full Member level 3
@LvW
Thanks. But i still have some questions. For example I want to use this switched cap resistor to set up the bias current in the current mirror. Is it possible to do this?
My aim is to get the bias current based on the value of the capacitor.
Regards,
/Noman Hai

#### LvW

Well, its not so easy since this seems to be a quite new design.
At first, the following idea has come to my mind:

The current mirror has to be biased by a current source.
An OTA is a rather good current source with a current which can be controlled by a resistor setting the transconductance gm.
Thus, with a fixed input voltage and a variable SC-resistor as a gm control unit an OTA could perhaps be used to bias your mirror.
Hope I understood the task well.

LvW

One final remark: Don´t forget that S/C-resistors are not continuous time units. Therefore, filtering/smoothing is necessary. And, as a result, the bias current will never reach the accuracy of DC.

Points: 2