0
\$\begingroup\$

I am trying to simulate the open loop transfer function of my system. My system is really classic. A converter (the plant transfer function), a sensor and a corrector which is a simple Integrator (1/(1+s/wp)). My corrector is a discrete transfer function. But I use the inverse bilinear transform to get it in the S domain. (I do not think that it is possible to simulate discrete transfer function in LTspice). My problem is the following, it doesn't work. When I simulate it with a transient analysis "trans", the duty cycle given is not correct and the output of my controller does not move in function of the output where as the output is really moving correctly because I used a method which set automatically the operating point #ChristopheBasso. I would like to be sure to what I have to apply on the control input of the PWM switch.

If I used the UC384X, from my side, I think the Input control of the average PWM switch is equal to the input of the comparator as it is shown above.

enter image description here

So after my corrector, I have to simulate the error amplifier? Isn't it? The model that I have of the error amplifier is clearly not representative of the real model. I saw when I looked the bode diagram of the error amplifier. But I do not think that It will prevent to make my simulation work. Then I should got add the real model if I want to obtain the correct open loop transfer function.

Here is how I set the error amplifier.

enter image description here

Have a nice day!

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Hello, the control input with the UC348x is the COMP pin and it goes through a 2\$V_f\$ offset before being divided by 3. However, you see a 1-V Zener diode symbol at the current-sense comparator input. It is there to limit the maximum peak current to \$\frac{1}{R_{sense}}\$ in open-loop conditions. With your simple op-amp, there is no clamp at all and it may overdrive the PWM switch input. Make sure you install a 1-V clamp somewhere before driving the control pin. A simple extra in-line equation can do the job. \$\endgroup\$ Commented Jan 22, 2021 at 8:16
  • \$\begingroup\$ Thank you for your comment ! I will try do to this :) \$\endgroup\$
    – Jess
    Commented Jan 22, 2021 at 8:34
  • \$\begingroup\$ When time permits I'll post a more comprehensive reply. \$\endgroup\$ Commented Jan 22, 2021 at 8:40
  • \$\begingroup\$ Thank you ! Take your time :) \$\endgroup\$
    – Jess
    Commented Jan 22, 2021 at 9:04
  • \$\begingroup\$ @VerbalKint Thank you ! It perfectly works now. \$\endgroup\$
    – Jess
    Commented Jan 30, 2021 at 11:01

1 Answer 1

2
\$\begingroup\$

In a circuit like the UC384x but also in many other controllers, the maximum peak current voltage setpoint is limited to a certain precise level. It is 1 V for the UC but can be of lower value in other controllers like 0.8 or even 0.5 V in more modern ac-dc PWM circuits. In recent low-voltage dc-dc controllers, it is no longer uncommon to encounter maximum voltage setpoints as low as 50 mV but then you can imagine the sensitivity to switching noise in this case and good layout with adequate components choice are paramount.

This upper limit is there to protect the converter against peak current runaway when the loop is open. This happens during the start-up sequence, before the output voltage reaches the target, but also in fault conditions such as short circuits or optocoupler failure. With a 1-V maximum voltage setpoint and a sense resistance \$R_{sense}\$, then the maximum permissible current is: \$I_{p,max}=\frac{V_{max}}{R_{sense}}+\frac{V_{in}}{L_p}t_{prop}\$ in a flyback converter where \$t_{prop}\$ represents the delay incurred to the IC internals plus the driving time to effectively turn the MOSFET off.

In the UC348x picture shown below, the control section starts at the COMP pin of the error amplifier:

enter image description here

The voltage first undergoes an offset subtraction of 1.2 V roughly and this is to ensure a true zero-current setpoint when the COMP pin either rails down to 0.8 V (typical) with the op-amp or is externally brought to ground via an optocoupler. In reality, the \$V_{CE,sat}\$ of the opto is around 200-400 mV depending on various factors and owing to the diodes, you truly have zero volt at the current sense comparator. This interesting feature brings 0% duty ratio at no cost and allows operation of unloaded converters without output power runaway. The division-by-three is there to augment the op-amp dynamics. Without it, the op-amp output would move between 1.2 and 2.2 V to bring 1 V as a maximum setpoint. However, this would restrict the op-amp on a low voltage range but could also compromise the noise susceptibility. For that reason, the divider forces a higher voltage on the op-amp output (4.2 V to obtain 1 V) and naturally expands its output dynamics.

If you now want to model this controller with the CM PWM switch model, it is important to properly build this op-amp sub-circuit. The circuit in your post uses a simple voltage-controlled voltage-source with a 60-dB gain and it looks like the simplest option. It has several drawbacks:

  1. the circuit output is unclamped meaning that during bias point operations the "op-amp" can peak to several kV. Yes, libraries don't burn but SPICE can't compute a proper bias point in this case.
  2. if you run transient analyses, you may have totally abnormal voltage values across the compensating elements.
  3. you have to reproduce the circuitry in the current-mode PWM controller you have adopted which is to limit to 1 V max the bias at the control pin of the CM PWM switch model.

The below circuit shows a first possibility to model the UC384x and this is a very first approximation which does not work with an optocoupler pulling the COMP pin down but it is good enough to obtain a first ac response with the PWM switch model. A more comprehensive model with a 1-mA maximum output is given in my book.

enter image description here

In this circuit, the output voltage is clamped to 5 V and 0.8 V via perfect diodes (N=10m) and there is no convergence issue considering the 100-µS source involved when the diodes clamp. So if you connect this op-amp to your model, you need a add a 1-V Zener diode and you should be ok:

enter image description here

You could also use an in-line equation (analog behavioral expression) and clamp the error voltage between 10 mV and 1 V. You could even group the 1.2-V offset subtraction and the divide-by-3 operation in the same line:

enter image description here

You read the expression as:

IF V(err) is less than 10 mV THEN V=10 mV IF V(err) is greater than 1 V THEN V=1 V ELSE V=V(err)

Hope this helps your model converge!

\$\endgroup\$
4
  • 1
    \$\begingroup\$ To OP: Verbal Kint is "Christophe Basso" a.k.a. The God of SMPS Control :) Joking aside, make sure you peruse his answers. \$\endgroup\$ Commented Jan 22, 2021 at 15:12
  • 1
    \$\begingroup\$ Thank you Rohat for the panegyric but I am just modestly trying to share my knowledge with reader friends and colleagues world-wide: I'm glad if I can help : ) \$\endgroup\$ Commented Jan 22, 2021 at 16:11
  • \$\begingroup\$ Thank you so much for this help ! I will try all what you said and thank also for the tips ! It is always interesting ! I already have your books ;) and I saw your UC384X models. I have actually some troubles when I add the diode (N=10m emission coefficient), it completely deforms my bode diagram. But I will continue to look from my self ! I have still a lot of stuff ;) and skill to learn ! I learnt so many things via your books and I can just say : "Thank you". One day, I will try to buy you some chocolats If I return to the "rose" city. \$\endgroup\$
    – Jess
    Commented Jan 23, 2021 at 16:35
  • 1
    \$\begingroup\$ With pleasure! The emission coefficient of the diode down to 10m (perfect diode \$V_f=0\$) can sometimes make the clamp too brutal and it bothers the simulation engine. There is no problem to increase it to higher value and tweak the dc source to have the correct clamp voltage. Increasing \$R_s\$ and TT will also make the perfect diode more realistic. Again, you can replace these diode by 1N4148 and tweak the dc sources for the right clamp voltages. Chocolates are good with a good glass of wine! : ) \$\endgroup\$ Commented Jan 23, 2021 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.