Simulate a step-down chopper circuit using LTSpice

  • Topic: Engineering 
  • Thread starter Fatima Hasan
  • Start date
  • Tags Tags
    Circuit Ltspice
21 replies · 5K views · last reply
Fatima Hasan
Messages
315
Reaction score
14
Homework Statement
Written below.
Relevant Equations
-
Simulate the circuit shown below sung LTspice.I tried to simulate it , but I didn't get the corrected result. Here's is my attempt:

LTspice schematic of an op-amp circuit: U1 LM741 with V1 SFFM source on the non-inverting input, R1 5k and R2 5k feedback network, V2 15 V, V4 15 V, V5 -15 V supplies, R3 1k driving transistor U2, and R4 1k to V6 10 V.

LTspice Independent Voltage Source V1 dialog with the SFFM function selected, showing DC offset 0, amplitude 5 V, carrier frequency 500 Hz, modulation index 0.2, and an empty signal frequency field.

The result (voltage in the collector of the transistor) :

LTspice oscilloscope-style plot of V(n001) with a dense band of vertical green lines filling the trace between about 5.88V and 6.18V, time axis from 560ms to 1.04s.


Could someone let me know where is my mistake?
 
Last edited:
This looks like a continuation of your previous thread using MultiSim:

https://www.physicsforums.com/threa...ep-down-chopper-using-multisim-matlab.988525/

First of all, this is not a "step-down chopper circuit", so I may end up fixing your thread title. You also never answered my question in your other thread about what function the opamp is serving in this circuit. It is not being used as an opamp, it is being used as a ______________. Please try to answer that question.

On your LTSpice circuit, there are a number of errors. First, the -15V voltage supply for the LM741 is connected to +15V. Please reverse that voltage supply so that the LM741 is running between +/-15V power supplies.

Second, you have 0V going into the "-" input of the 741, but the triangle wave generator going into the "+" input is ramping 0V to 5V, so the 741 will not trip. You need to offset the "-" input to somewhere in the middle of 0V to 5V if you want to see a tripping behavior to drive the output transistor.

Finally, it is not good practice to draw the wire to the "-" input as you have done. When the wire to the connection point runs along the body of the IC symbol like that, you can't be sure that the wire is reliably connected to the "-" input point of the opamp. Instead, draw the wire coming at a right angle out of the opamp triangle symbol (to the left) for a little ways, before you put in a right-angle bend in the wire to go down to the voltage supplies below.

Can you make those fixes and then show us what the quiescent voltages are for all of the nodes in the circuit before you turn on the triangle ramp generator? Thank you.
 
berkeman said:
First, the -15V voltage supply for the LM741 is connected to +15V. Please reverse that voltage supply so that the LM741 is running between +/-15V power supplies.
Actually, looking closer I see that you have listed the "voltage" of that battery as "-15V", so it might actually be okay. It is very misleading to use a symbol like that battery symbol and set it at a negative voltage, IMO. It would be better to turn the battery upside down with a +15V output, in order to make your -15V supply. Maybe it's just an LTSpice style issue...

LTspice schematic fragment showing a battery symbol labelled V5 with value -15, a ground symbol below it, and partial labels reading 1741 and 1k.
 
berkeman said:
Maybe it's just an LTSpice style issue
No, you can draw, connect, and define these as in other schematic capture SW. .
 
DaveE said:
No, you can draw, connect, and define these as in other schematic capture SW. .
Yeah, but a battery symbol means something else to me, versus a generic round symbol for a voltage source. Once I see a battery symbol, my mind automatically looks for the longer line side and associates it with "+". Then changing the "value" of that symbol to a negative voltage gives me vertigo.

I don't think I've ever used a battery symbol in a Spice simulation, but I could be wrong. Hopefully LTSpice has traditional voltage source symbols available, like I use in Micro-Cap Spice software:

Micro-Cap screenshot of an op-amp inverting amplifier schematic: voltage source V3 driving a 1k input resistor, a 10k feedback resistor, and load R3 2k with output labeled Vout.
 
berkeman said:
LTSpice has traditional voltage source symbols available
Yes, I think it does (I haven't used it in several years, though). Typically the battery symbol is a only a DC source, and the circular symbols are more complicated waveforms (or just DC, if you want). It's just a difference in style.
 
berkeman said:
First of all, this is not a "step-down chopper circuit", so I may end up fixing your thread title.

BTW @Fatima Hasan -- After looking at the circuit again (assuming appropriate fixes to the schematic), I may be able to see how one could call this a "chopper step-down" circuit, but a more accurate description would be a "PWM" analog voltage generation circuit, but only if there is a diode and a capacitor added in the right place. :wink:

Have you had a chance to work on this project any more?
 
berkeman said:
BTW @Fatima Hasan -- After looking at the circuit again (assuming appropriate fixes to the schematic), I may be able to see how one could call this a "chopper step-down" circuit, but a more accurate description would be a "PWM" analog voltage generation circuit, but only if there is a diode and a capacitor added in the right place. :wink:

Have you had a chance to work on this project any more?
I tried to make the fixes you mentioned, but could you please explain further how to fix the third point ?
LTspice schematic of an op-amp LM741 comparator stage with inputs from SFFM source V1 and a resistive divider R1 and R2, driving R3 into a transistor U2 with load R4 and supply V6.

(V3 =15 V, V2=15V )
The result :
LTspice plot of voltage V(n005) over 930ms to 966ms, y-axis about 6.82875V down to 6.82905V, showing narrow vertical green pulses at irregular intervals across the window.
 
The circuit looks much better, thank you. :smile:

The key here is that the opamp is being used as a comparator, to compare the two input voltages from the voltage divider on the "+" input and the sawtooth waveform on the "-" input. As you move the reference voltage that you put into the "+" input by varying those two voltage sources, you will trip the comparator earlier or later on the rising ramp of the sawtooth waveform. That will give you a varying duty cycle on the "pulse width modulated" (PWM) output of the comparator.

Can you clarify what the numbers shown next to the V1 ramping supply symbol mean? I'm not sure they mean the same thing as in my Micro-Cap Spice program. Do they mean you are using a sawtooth ramp that goes from 2.5V to 5V? I think you used to have the ramp going between 0V and 5V -- either is fine, but you need to keep in mind that you will adjust the comparator input voltage to different places along that sawtooth input ramp to get different output duty cycles out of the comparator into the output transistor stage.
LTspice schematic of a comparator stage: a voltage source labelled SFFM(2.5 5 500 0.2) feeds the inverting input of an op-amp (U1), and a resistive divider with R1 and R2, each 5k, sets the non-inverting input.
 
berkeman said:
The circuit looks much better, thank you. :smile:

The key here is that the opamp is being used as a comparator, to compare the two input voltages from the voltage divider on the "+" input and the sawtooth waveform on the "-" input. As you move the reference voltage that you put into the "+" input by varying those two voltage sources, you will trip the comparator earlier or later on the rising ramp of the sawtooth waveform. That will give you a varying duty cycle on the "pulse width modulated" (PWM) output of the comparator.

Can you clarify what the numbers shown next to the V1 ramping supply symbol mean? I'm not sure they mean the same thing as in my Micro-Cap Spice program. Do they mean you are using a sawtooth ramp that goes from 2.5V to 5V? I think you used to have the ramp going between 0V and 5V -- either is fine, but you need to keep in mind that you will adjust the comparator input voltage to different places along that sawtooth input ramp to get different output duty cycles out of the comparator into the output transistor stage.View attachment 262459
DC offset : 2.5
Amplitude: 5
Carrier frequency = 500 Hz
Modulation index = 0.2
 
Fatima Hasan said:
DC offset : 2.5
Amplitude: 5
Carrier frequency = 500 Hz
Modulation index = 0.2
Interesting. What's a Modulation Index in this context?

Anyway, did you understand my comments about how the rising sawtooth waveform defines a pulsewidth for the output of the comparator circuit? I think that's what the homework problem is trying to guide you toward.

So how can you optimize setting the input comparator voltage and your sawtooth ramp voltage input to give you the ability to set this circuit between 0% and 100% PWM output? And can you figure out where to put a diode and smoothing capacitor on the tranistor output circucit to let you set the output voltage with your PWM control circuit? :wink:

(sorry that this is such a hard learning exercise with so few resources available to you during the pandemic. Please just keep trying your best to answer our hints and questions to guide you to a better understanding of circuits like these. Hang in there! :smile: )
 
berkeman said:
Anyway, did you understand my comments about how the rising sawtooth waveform defines a pulsewidth for the output of the comparator circuit? I think that's what the homework problem is trying to guide you toward.
Just to confirm , what I understood that to change the pulse width for the output of the comparator, I have to change the values of the two voltage sources which are connected to the '+' input of the comparator in order to change the pulse width. When the modulation index (for example = 0.2 ) , we have to divide 0.2 by the amplitude of the sinewave which is 5V to get the value of the 2 voltage sources which are connected to the '+' input of the comparator , since the modulation index is the ratio of the amplitude of the sine wave to the value of the '+] input of the comparator. Am I right ?
 
Yes, I think you are getting closer to understanding how to work with this circuit.

I still don't understand the definition of "modulation index" in this context.

I would just use one voltage source for the "+" input to the comparator circuit. You can ramp that in your Spice simulation to show how the PWM output.

Is the overall goal to show the transfer function between the "+" input to the comparator to a lowered PWM output voltage? If so, you still need to add a rectifying diode and smoothing capacitor to the output circuit.

Do you have any instructor or TA resources available to answer these types of questions? :smile:
 
berkeman said:
I still don't understand the definition of "modulation index" in this context.
from http://electriciantraining.tpub.com/14184/css/Modulation-Index-101.htm :
Printed textbook page excerpt defining the modulation index as the ratio of frequency deviation to modulating frequency, with the formula modulation index = Δf / fm and variable definitions below it.


berkeman said:
Is the overall goal to show the transfer function between the "+" input to the comparator to a lowered PWM output voltage? If so, you still need to add a rectifying diode and smoothing capacitor to the output circuit.

Do you have any instructor or TA resources available to answer these types of questions? :smile:
No it's not required to find the transfer function.
I didn't find any similar circuit to this, but I have the values of the load voltage and current when the modulation index is varying from 20% to 100%.
 
berkeman said:
Yeah, but a battery symbol means something else to me, versus a generic round symbol for a voltage source. Once I see a battery symbol, my mind automatically looks for the longer line side and associates it with "+". Then changing the "value" of that symbol to a negative voltage gives me vertigo.

I don't think I've ever used a battery symbol in a Spice simulation, but I could be wrong. Hopefully LTSpice has traditional voltage source symbols available, like I use in Micro-Cap Spice software:

View attachment 262294
I tried to simulate using Spice, but how to determine I don't know how to determine the values of the ac voltage source, how to set the frequency , modulation index , . . .
Here's my attempt:
Schematic of an op-amp circuit in LTspice: a 5k and 5k resistor chain (R4, R5) fed by a 15 V source (V4) into the non-inverting input of op-amp X1, with V5 at the inverting input and V2 and V3 at 15 V supply rails; the output feeds 10k R2 into the base of NPN transistor Q1, with 10k R3 and a 100 V source (V1) at the collector side.

LTspice Voltage Source properties dialog with Sin tab selected: DC 0, AC magnitude 5, AC phase 0, VO 0, VA 1, F0 1meg, TD 0, DF 0, PH 0; schematic behind shows V5 and R5, R4 resistors and V4 15.

Could you please explain? I didn't use this software before.
 
Sorry, you now show a sine V5 AC source into one of the opamp inputs, but I thought this was supposed to be a PWM conversion circuit. You would need to use a sawtooth input into the comparator versus some DC comparison level in order to generate a PWM waveform.

Also, it looks like there is a mistake grounding the base of the transistor? That needs to be deleted before the output transistor stage can toggle.
 
berkeman said:
ou would need to use a sawtooth input
I didn't find a sawtooth waveform block in Spice , but I tried to get it using AC voltage source:
Screenshot of the LTspice Pulse voltage source dialog with fields DC 0, AC magnitude 5, AC phase 0, V1 0, V2 5, TD 0, TR 10n, TF 10n, PW 0.2, PER 1u, and Fraction .2.


I sat the initial value of the voltage to 0,the pulsed voltage to 5 V and the pulse width to 0.2 ( 20%= 0.2 ).
 
Fatima Hasan said:
I sat the initial value of the voltage to 0,the pulsed voltage to 5 V and the pulse width to 0.2 ( 20%= 0.2 ).
How to determine the other values ?
 
Fatima Hasan said:
I didn't find a sawtooth waveform block in Spice , but I tried to get it using AC voltage source:
Maybe set the TR (rise time) to something long to get a ramp? Try that and use an oscilloscope probe or plot to see what you get...
 
Normally in spice you would make a ramp by using the piece-wise linear definition of a voltage source. This feature allows you to build an arbitrary waveform by specifying points (voltage at a specific time) and the source will connect them with straight lines, these can be repeated at a defined frequency.
 
berkeman said:
Maybe set the TR (rise time) to something long to get a ramp? Try that and use an oscilloscope probe or plot to see what you get...
When TR is 10 sec.
LTspice schematic close-up: transistor with emitter to ground, resistor R3 labeled 10k in series to a node, voltage source V1 labeled 100, and a tooltip reading 'st Voltage=1.485MEG : Node Name'.

The voltage waveform across this node is :
LTspice plot titled 334lab_report.cir of voltage V(8) in volts against time T in seconds from 0 to 1 microsecond, a blue trace with a y-axis labelled 1.49M to 1.49M and a cursor readout of 852.792n, 1.485M.

Are the other parameters correct ? or is there any mistake in the connections ?
 
DaveE said:
Normally in spice you would make a ramp by using the piece-wise linear definition of a voltage source. This feature allows you to build an arbitrary waveform by specifying points (voltage at a specific time) and the source will connect them with straight lines, these can be repeated at a defined frequency.

The voltage parameters:
Screenshot of the LTspice PWL source settings dialog with DC 0, AC magnitude 1, AC phase 0, and PWL text 0,1 100n,2 400n,3 500n,4 600n,1 700n,2 1u,0.

Here's what I got :
Line graph of V(8) in volts against T in seconds, from 0 to 1.00 microseconds, showing a jagged blue waveform with a tooltip reading 423.012n, 1.399M.