# Optocoupler ac model ltspice

I am trying to plot the bode diagram of a flyback converter on LTspice. This is the first time that I do this and before trying to plot my flyback converter, I would like to plot the bode diagramm of a flyback whose I know the answer in order to see if I am able to do it correctly. So I took an example from the book "Switch mode power supplies" (amazing book) written by Christophe Basso.

Here is the example:

I have some troubles to understand how the optocoupler is modelized. The parameters of the optocoupler model are the following :

• CTR (CTR = 2)
• Fp which is probably the frequency of the pole of the transfer function of its model (Fp = 6k)

As Christophe Basso wrote it in its book an optocoupler has a parasitic emitter collector capacitor. So I did the following model :

Nevertheless, It probably miss something ... as I do not get how to have a 1st order transfer function with a pole :

$$H_{opto}(s) = \frac{G_{0}}{1+\frac{s}{wp}}$$

Thank you very much and have a nice day !

• You can get rid of the series pole brought by X4. The parasitic capacitance of the opto simply comes in // with Cpole which is placed for the compensation pole. I originally added X4 to account for the phase deviation brought by the opto but considering the total capacitance made of the opto cap. in // with the cap. at the feedback pin is the way to go. The pole expression is then $\omega_p=\frac{1}{R_{pullup}(C_{opto}||C_{pole})}$ Commented Nov 7, 2020 at 11:34
• Ok thank you very much ! ;)
– Jess
Commented Nov 7, 2020 at 12:23
• @VerbalKint Sounds like an answer to me. :-) Commented Nov 7, 2020 at 12:25

When realizing a type 2 compensator (1 pole at the origin, 1 zero and 1 pole) with a TL431, you form the second pole by decoupling the feedback pin of the controller to ground via a capacitor. This is $$\C_2\$$ in the below picture:
However, it is important to realize that the optocoupler pulling the FB pin to ground adds its parasitic capacitance to the capacitor already in place. It does not add a second pole (at least in low frequency) but simply shifts the original pole: $$\\omega_p=\frac{1}{R_{pullup}(C_2||C_{opto})}\$$. As such, once the type 2 pole position has been determined and a capacitance calculated, the final value connected to the controller must account for the optocoupler capacitance. For instance, assume you calculated a 4-nF total capacitance and the opto already contributes 2 nF, then the final capacitor will be 2 nF. As indicated in the comment, I was originally considering the optocoupler pole as an added one but it is not the case as explained in the above lines. The extra block X4 can thus be omitted.