 All right, good afternoon centers, coordinators and participants. We will spend about half an hour in going through some of the simulation exercises and the idea is basically use of simulation in teaching course on basic electronics. Now, some of the centers have already informed me that they would be using not the SQL simulator which we had recommended, but they are more familiar with some other simulators like P-spice and T-na or whatever it is. So, they are free to use these other simulators, but do the exercises that we are recommending, so that the participants benefit from the content. So, the objective really is not so much to learn a new simulation package, but to use simulation for teaching basic electronics. So, that we should keep in mind that is really the first and foremost purpose. All right, so those who are using SQL, if you have been to the SQL website, there is a set of simulation exercises here. All the coordinators are requested to maximize their screen, so that they can view things properly. It is not so important to view my photograph at the centers. You will see that tomorrow again. All right, so there is a link called simulation exercises and just click on that. You will have a number of exercises listed over there. Now, we will only go through some of these and again the important thing is for the participants to try out some of these and think of how these are useful in teaching really more than it is not the mechanical use of a simulator. It is really using a simulator to teach. So, let us look at some simple examples. Let us start with, okay. So, let us look at an RC circuit, a simple RC circuit with periodic input and the document for that looks like this. All right, so in this problem, this RC circuit is being driven by a square wave and as you change R and C, this waveform is going to go up and down and there is an exercise which says that you show certain things. Now, these are things that you can actually do work out at home and not in this session, but it is very important that you do this and you get your students to do it as well because it brings about a lot of fundamentals very clearly. So, in this exercise set, what we have set is for R equal to 1 K C equal to 1 micro and T equal to 2 milliseconds. Similarly, the circuit for different values of T 1 and T 2, right. What is T 1 and T 2? T 1 and T 2 are these high and low periods and if you do that, you will observe that this waveform will shift its DC value and that is only natural because it follows this particular relation and you must show that on paper. All right. So, that is one. So, that is for different values of T 1 and T 2 and in each case, compare the simulation result with the expression given above in the document, right. That is one. Derive an expression for the current in steady state for the conditions in one, validate your analytic result with simulation. All right. So, let us this example is already there. All of these examples are in fact there in the sequel distribution as it is and you can run that or you can use some of you have said that you will use some other simulators like proteas and pea spies and that is also fine, but make sure you do it, right. So, let us look at this example in sequel. The name of the file is given this at the top of this document, right. So, the document talk about this document says E 1 0 1 underscore R C 1 B and that is just a standard extension for sequel project. So, if you look when you open try to open a file you look for this particular name E 1 0 1 R C 1 B. So, there it is open it. All right. So, that is what it looks like and this says that the R value is 1 k, C value is 1 micro parent. So, it is already ready made for you and high voltage is 1 and T 1 is 1 millisecond, T 2 is 1 millisecond. To run this program or run this particular example just say run solver, all right. You will see a message here called program completed and once you see that you the control will automatically go to graphs, right and the graphs you will see some files which you have which we have asked for and you can look at you can choose an x axis and. So, most of the coordinators will be familiar with this and they will be able to explain to you better. All right. Choose the time as x axis and for example, you can choose the input voltage B A and output voltage B B as a y axis and then just say graph it. When you say graph it you will be able to see a plot. Now, in this particular example we are interested in the steady state part not in the beginning transient and note in particular what this value is what is the average value of the output voltage. So, I will just do this for you and then you can do the others yourself. So, in the for example, here in this exercise we are saying change try this output different values of T 1 and T 2 and we have just tried T 1 equal to 1 millisecond T 2 equal to 1 millisecond. Now, let us try this for example, T 1 equal to 0.2 millisecond T 2 equal to 1.8 millisecond. So, let me go back to the circuit editor. Let me click on this element because those are the properties of that element go to this property editor and then there is this T 1 here which is 1 millisecond right now I can change that to 0.2 millisecond and T 2 I can make 1.8 millisecond and with that I can run this the program again and view the output results and that is what we see. So, you see that the average value of the V C waveform has shifted up and all that of course is because of good reasons and that is this. So, that is just an example of what you are going to do in this particular RC circuit example. Let us go to some others. Let us look at an RLC series circuit resonance series RLC circuit number 4. Click on that it says it just gives you a brief description first what is the current in a series RLC circuit and so on and the following results hold for this circuit in the sinusoidal steady state. The total impedance seen by is minimum and so on of course all of these are standard results. What is not standard is the plots that you can view with a simulator and that very often we have not seen all of those plots and it is very important that we do that. So, let us see look at the exercise set. So, first for all for some given values of R and L and C calculate F 0 and the bandwidth verify with simulation. So, how would one do this? Let us look at the name of this file here. It is called E 101 Resonance Reso RLC 1. So, let us let me open this file it is in E 101. So, that is a series resonance series RLC circuit and there are some meters here which measure some voltages right now let us say ignore it. So, let me run this solver run this circuit and look at the magnitude of the current versus frequencies. So, I chose frequency on the x axis and magnitude of the current on the y axis and let me say graph it. So, that is what I see and remember in all of these circuits the frequency should always be on log scale otherwise you cannot see cannot really resolve things properly. So, let us choose the x axis to be log axis and now you can clearly see the peak. So, the peak is between something like 5000 hertz or 5 kilo hertz and that is what you should get as the calculated value as well alright. Are there any questions at this point? No are there any questions at this point? Should I is there any way to invite questions or let me just take two questions because otherwise we will spend all the time in question and answer right now. So, let us that is so the question from professor Marathe in KJ Somaya college is whether we can go through a trial session using SQL from start to end that is start an example and see how it is to be constructed alright. So, let us do that. So, let me take for example, this first circuit that we saw right this RC circuit with a periodic input and let us construct this from scratch although we already have it let us just go through that exercise. So, everybody knows what is to be done alright. So, let us open a new project and since in this case I already know which components there are we are going to use a clock we are going to use an R and we are going to use a C. So, let me get all those components first that can be done the easiest way to do that is if you know the name of the component type that name of the component and. So, in this case R dot E C E now E C E as we said earlier in the workshop that stands for electrical compound elements and that that string will show you everything all the components that end the end in particular in that particular sequence. So, there is a R dot E C E a resistor here. So, I select this resistor with a single click and then I take the cursor to the canvas and then a double click here. So, then this component comes to the canvas and so on I can select a capacitor and then I can select a clock ok. A clock is a voltage source now this capacitor is not looking right I would like to change its orientation. So, I can do that there are different ways of doing it the easiest way is to select it with a single left click and then press R for rotate and that will get rotated. And of course, if you want to move things around you can select them and move it like that or you can you can select and use the arrows etcetera right. So, let us make the connections apart from this we also need a ground. So, let me look for ground and let me place it so that I can make connections easily. Alright the next step is to complete the wiring. So, click anywhere on click on one of the nodes alright and then you will see a cross here and if you want to introduce a bend just do a left click there and then click on the node where you want to end it and then the wire will show up. If you make a mistake like this suppose you want to get rid of this file you can just press escape and it will go away. You can zoom in and out by using the mouse center key or you can also use these zoom out zoom in options in the menu in the top menu bar alright. So, let me finish the complete the wiring that is done this resistor I would like it to be 1 k. So, I click on this click on this property editor and then you can see there is a property called R that property I want it to be 1.0 k I can write this as 1.0 k or I can write it as 1.0 e3 or I can write it as 1 e3 and so on any of these things are ok. So, it is 1 k this capacitance I would like it to be 1 micro farad. So, it is 1 u u for micro alright then this clock I would like t 1 to be 1 millisecond t 2 also to be 1 millisecond then you reduce the AC a little bit too cool t i equal to 1 d t 1.01 millisecond d t 2.01 millisecond and so on ok. Some of these things you may not know what to put in that case you just do a right click on the element and say element help ok and then you will see what is what for example here is a document on clock dot e c e ok it tells you what is what are all the various parameters alright. So, now so now I do not suppose you want to see the value of this resistance on the on your canvas there is a way to do that. So, you do a right click and say add element property text box select this element and select the property that you want to display and then you get this you can of course, move around that box and so on etcetera. So, you can do this pretty much with all the components that way you have a visual feedback about the values alright. Let us move on to output variables we would like to define some of these variables for viewing as output variables. So, go to output variable tab click on add variable and then click on one of the wires that you want to see the node voltage alright. So, that has come if you see there is a default name that is generated and then there is something called a keyword node b of something something right. So, that something something is the name of this node this node name can be changed for example, I can select this I can do go to property editor I can make this a for example alright. So, then and then in that case this will automatically change in the property editor I can also change the name of this variable and in this particular case it makes sense to call it v a for example alright. Let me add another output variable and that is the node at the voltage at this or the node voltage at this particular node and let me call that v b and let me also name this node and I will name this node as 0 because it is a count although that is not required fine. So, the output variables are 2 in our case v a node v of a and v b node v of b if you want to display the name of this node just go to element property text box select this resistance and select n node for example, that is where the b is connected and say ok then the b will come here and then you can move that around if you want alright. What next? Next step is to tell the simulator as to what we want to do with the circuit and so you go to solve box add a solve block the default type of the solve block is DC simulation click on that and you can change that to transient in this case we are interested in transient or time domain simulation so change that to transient simulation. When you click on transient simulation some of these things will come up by default so the starting time, the ending time and the time step. So, ending time at time in this case I would like it to be let us say 10 milliseconds, delta t may be 0.01 millisecond all these things of course, you need to know how to choose and that will take some effort. So, the best thing is to go through some existing examples see how it is done and then do your own examples alright. Next step is we need to choose a method for solving the equations and a good method very commonly used method is the backward Euler method. So, in this on the left hand side you will see backward Euler just drag it and drop it in this box and then you can change this property. So, here the by the default is no so we want to make it a yes. So, then that you can do on the right one more thing that we need to do is to put an output block. So, take an output block and we need to add output variables. So, click on output variables select V A V B and say all that comes on the screen. I think that is more or less all now we can run the program and once the program run successfully you can see this message here SQL program completed and then you get to the graphs you know. So, select the output file sometimes there can be more than one file if you have defined more than one select time as the x axis and the input voltage and output voltage on the y axis and that is what you get alright. So, this is how you go through the basic sequence of making a simulation designing your circuit as well as running the simulator. Let us invert some questions ok the site the site is and you can if you are using windows you can download the windows version and there are instructions then to install it. Your coordinator would have probably already done that on the in the lab just ask the coordinator first right. So, there was a question from KK Warg college Nashik and they were not getting the video and they want me to explain some of the basic points once again alright. So, let me just quickly do this. So, if you want to create a new circuit click on new here and you can get the components that you want from this menu on the left hand side you can search you can click in the on the left window and you can double click in the canvas and the component comes there ok. So, I wanted R C and clock and then I also want the ground. So, there are there is a ground element here to rotate an element just select it and press R that rotates to edit the properties click and select property editor and then you can edit the property that you want. So, here for example, for R I will take 1.0 K C I will take as 1 U which is a 1 microparad and for clock I will take T 1 as 1 millisecond T 2 as 1 millisecond D T 1 D T 2 other rising and falling edges I will take that as 1.01 millisecond each it should be smaller than T 1 T 1 much smaller than T 1 and T 2 after that the wiring. So, click on a node and if you want a bend in the wire click again and then terminate it and so on. After that if you want you can name the nodes you can name the nodes either as a properties of an element or you can know edit it directly alright. Then define output variables add variables say this voltage and this voltage you can change these names then you need to go to solve blocks add a solve block change it to transient simulation select starting time ending time and the time step. Then you need to select a method there is a method called backward Euler that is very convenient and most commonly used you can make that yes because the default value is known then you can put an output block and you can select output variables V A V B that is it. Now you are done with the solve block as well as the circuit I can just run the solver and view the results alright. So, now if you are using SQL this is the procedure if you are using some other software like Proteas or Tina or whatever then the coordinator at your center will explain to you what to do. Now in the rest of the time what we will do is we will just look at some exercises we will not really build them but we will just look at the existing SQL files and I will try to emphasize on what you should observe and what you should have your students observe when you teach in courses. So, I was looking at RLC we have finished that I do not have too much time. So, let me just look at some four or five more examples and then we will let you work on these yourself alright. So, there is an example for diode clipper in E 101 it is called E 101 diode clipper 1. So, here is a very simple clipper it is driven by a triangle source R equal to 1 k and there is a DC voltage source of 1 volt in series with the diode alright. So, you run this and we can observe you can select x axis V in as the x axis V out as the y axis and we can have a graph of it and that is what the clipper will do and of course, it is important that you ask your students to figure out what this value should be what this should be and so on alright. Now, this is fine but you would also like to see what the current is in the diode. So, if you look at the circuit this diode will start conducting only if this voltage exceeds about 1.7 volts alright and so that is that is important to show the students. So, let me go back to the graphs menu select the current as well and let me select the right axis for the current because it will have different very different number it will be in milli that means, 10 raise to minus 3 whereas, the output voltage is in volts. So, therefore, I would like that to be on the right hand side and then graph it. Now, I can see these two together. So, you can see that the green line is the diode output diode current. So, the diode starts conducting at about 1.5, 1.6 volts and then it and this slope of course, will then be given by the resistance in the circuit and that is the output voltage. So, it is very important to view these two together. So, that the students get to know exactly how the circuit works you can also look at things in the time domain. So, that is the time domain. So, there is this is the output voltage let us also see the input voltage. So, that is the time domain. So, the input voltage is green output voltage is pink sorry output voltage is blue and then the diode current is in pink alright. So, that is and you can of course, make these things more complicated introduce one more diode and so on and ask the students to play with it. So, in the case of diode circuit, there is a rectifier example E 101, E 101 rectifier tap 2 or sorry here is a rectifier with a Gener diode regulator and it is ready made again. So, you can just run this circuit and then there is a there are exercises like I said earlier, you can go back here you can see rectifier. So, there is an basic operation of the circuit is described in this document the name of the file appears on top and then the student is asked to do a few things. So, that the understanding improves. So, for V m equal to so and so R s and R and so on work out the following quantity quantities analytically average value of the capacitor voltage ripple voltage average current through D 1 D 2 feed current through D 1 D 2 these are not easy, but it is a very well definitely worthwhile exercise maximum reverse voltage appearing across each diode and so on and then you can do the simulation and verify that your understanding is indeed correct or not. So, the diode currents for example, clearly one diode conducts then the next then the first one then the second and so on capacitor voltage source voltage. So, that is the source voltage and that is the capacitor voltage you can expand this capacitor voltage to see the ripple and you can see this ripple if you want to expand it further that is what the ripple loop looks like. You can actually measure you can from this graph you can see what the ripple voltage is and verify that with your calculation. You can also look at the voltage at the load that is the output voltage and that is of course, regulated before it is much better than the capacitor voltage. So, that is at 5 volts because it is a 5 volt Z m and you see the ripple it is basically disappeared. So, that is the rectifier example, we will just look at two more examples and then maybe three more examples and then we will let you work out things yourself. There is a question. So, there is a question which says how to choose a method to solve blocks in the solve blocks tab for a particular circuit and is it different for different circuits? Of course, it is different for different circuits. It depends on what you want to do with the circuit whether you want to want a DC analysis or a transient analysis or AC analysis for how long you want to observe the output for what range of frequencies and so on. So, all of these things will depend on the circuit and there is a detailed manual if you go if you just go to the top to the tab at the top there is a manual here. This manual explains all of these things in more detail. So, as I said earlier this is not something that you will pick up in one day, but you can get started today and go through this manual in more detail and also use the existing examples see how things have been done and that will certainly give you more confidence in using the simulator. So, for today I would say play with these existing circuits change component values see the results and the important thing is not to use the simulator as a toy that anybody can do, but learn something from the results. Let me look at a BJT mirror one. So, there is a mirror circuit very simple mirror circuit and what do you look for in a mirror? You look for mirror in the output resistance output load or the load which is constant more or less irrespective of the voltage the output voltage and let us see how this circuit performs. So, let us run this circuit and I would like to see the input voltage as the x axis output voltage as the y axis and let me graph just the opposite. Let me choose let me let me choose the output voltage as the x axis and the collector the I C 1 and I C 2 as the y axis. So, here is this part the first part the transistor is in saturation and we do not operate in that region. So, we can actually ignore that part. So, we should actually focus on this particular part and you can see that the output current is not quite constant. So, this is the input current and the output current actually varies with the output voltage. So, that is not very desirable although the variation is small it is not very desirable and that is why there is an improved BJT mirror which is used and that circuit is BJT mirror 2 in this particular set. So, look for BJT mirror 2 and that is a cascode mirror. Here once again the objective is design a certain output current and we want it to be independent of this voltage here. So, let us run this solver and see how this performs. So, let me take let me take V C 4 as the output voltage as the as the x axis and the load through the load through the resistor as the as the y axis or that is the same as this I C 4. So, that is what I will do V C 4 as the x axis I C 4 as the y axis and graph it. Now, you can see that the variation with respect to the output voltage is very very small you can actually see how much it is and you can see a huge improvement over the previous circuit and of course, you need to figure out why that is happening and that is happening because of this cascode connection and of course, the rest we will we will leave to you all right. So, just let me just take one more example with an op amp for example, op amp triangular wave generator. So, this is based on the op amp used as an integrator and another op amp as a Schmidt trigger and so that is the name of the circuit op amp the name of the file let us run this and see what happens there it is. So, this already wired for you just need to run it and that is what you get at the output and of course, the important thing is not we just look at the output what is happening also at these other nodes. So, that is for example, what is happening at node 6 what is happening at node 5 that is just a constant what is happening at node 4 what is happening at node 3 and so on. Let us look at node 3 node 6 and the output and of course, you will see this triangle at the output of the integrator and so on. So, figure out how this works and then there are of course, some exercises. So, repeat one so do all these things and repeat one for V s equal to 2 volts there is a voltage source here DC voltage source right. So, you need to figure out what happens if this is 0 or 2 volts or minus 2 volts of that will change things it is very interesting and if you actually figure that out on paper your understanding of this circuit is perfect and so the same goes with your students what is the purpose of this resistor R limit this resistor here. All these questions are very important and that is how I mean you should use a simulator to also answer some of these questions. So, I will stop at this point and I will let you have some fun with at your end, but we can take a few questions. So, there is a question which says give a demonstration of a digital circuit. So, I will just take one example go to there is a directory called digital circuits. So, let me take up down counter for example. So, here is an up down counter essentially there is a mode input and then there are these flip flops and if the mode is 0 then it counts up and the mode is 1 it counts down and so on it is a standard circuit binary counter and all j's and k's are equal to 1 all of these j's and k's are tied to 1. So, this digital circuits will run very fast and you can view the clock the q 0, q 1, q 2, q 3 etcetera all at the same time. So, you can clearly see the counting operation if you change the mode signal it will count this is counting up right then it will count if you change the mode signal it will count down. So, you can verify that any other questions how can we plot current how do we select the variable type. So, let me take an example. So, there is some existing example and I want to see the current through this particular register for example. So, what I do is add variable go to the output variable tab add variable and click on this R and then I can select I 1 which is the current through that register as the output variable and then you see here I 1 of R R because this name has got this register has got name R I can change this if I like I can make this I all right. So, that should answer that question anything else one demo one demo for sinusoidal source sinusoidal source let me take a power electronic circuit here is a sinusoidal source is that what you mean. So, this is the this is the circuit in time domain all right and this if you look at the properties of this sinusoidal source it has got the amplitude a frequency in hertz pi and p 0 and v dc and of course, you can look at the documentation of this and it will explain what is what all right. There is another if you want to look at the sinusoidal source in the complex the in the frequency domain there is already an example for the resonance e 1 0 1 resonance R L C 1 this one for example, here is the same AC source same element, but now the solve block is AC simulation all right. So, that means we are using we are in the frequency domain and not in the time domain. So, when I run this program this circuit I will I will get frequency as one of the x axis values and then I can plot the magnitude in the rectifier experiment for in the rectifier experiment for a sinusoidal input the output obtained was almost 0 please explain let us get back to that that is this is the example let me run it. So, there is the input here and output R here. So, the input is large the output there are two outputs one output is the output at the capacitor that has got a ripple and the other output is the output at the zener and that has got no I mean very small ripple as expected all right. So, the question is why is this output voltage small and that is simply because of the transformer it is a step down transformer and that is stepping down the input voltage that is why the output voltage is very small that will simply depend if you are curious you can always change the turns ratio of this transformer and you can make it larger. So, I will take your leave and I will meet you tomorrow again.