I am trying to simulate a type 2 Compensator using the TL431. For that, I am using the optocoupler SFH6156-3. What I am trying to accomplish is measuring the compensator transfer function to check/verify math results.
First I needed to extract the Optocouplet Pole frequency which I did. I am attaching the circuit, the frequency I obtained was around 17Khz. I think is a bit high but it is in range.
The second part is obtaining the transfer function from the compensator using also an opamp for the feedback. Here the results make no sense to me.
I am also attaching the circuit. In a real circuit, we have to include a transformer which I am doing for the injection signal.
Can somebody have a look and point me to what to look or change in order to get the rights simulation.