In this lecture, we give an overview of the milestone one requirements. In the first two weeks of the capstone design, you will select a DC-DC converter topology that is capable of interfacing the battery to the USB, design the converter power stage and then, test that design using LTspice simulation. So in this lecture here, we will go over the details of how that Spice simulation is going to be set up. We will use what we call a template and in particular for milestone one, the template is provided as milestone1 schematic file. What is the purpose of the milestone template? Several fold: first of all, the milestone1 schematic provides models for the battery pack; those are predefined, so don't touch those. Provides a model for the USB bus, provides model for the control signals that are coming from the power management part of the system, and also provides the simulation commands and parameters, and measurement commands that are going to greatly simplify evaluation of your designs. To be valid, your design must include the template in your schematic file. So your schematic file will look something like this. In the bottom part of this schematic screen, you can include your circuit and that circuit will include the components that are allowed, as we discuss in the Components lecture. And on top of that, we'll include the template. I will go over some of the details of the template so we understand some of the important points about it. So first of all, in the section of simulation commands and parameters, there are a number of parameters that are related to timing in the circuits to be tested, that you are free to adjust. So, we will say, at time equal to t1, we want your converter to be in steady state at operating point 1, producing 5 volt output at the USB, at two amps of current at the output. At time t2, we want the converter to be in steady state at operating point 2 with 20 volt output on the USB bus, and 3 amps of output current. And finally, at the end of simulation, we call that Tend, the converter should be in steady state at operating point 3, and that's the case where we have the power flow in the opposite direction with the Vbus of 20 volts charging the battery. On the example template that is provided, we have those values set to one millisecond, two millisecond, and three millisecond, but these parameters can be adjusted, if you find your converter needs more time to get to steady state, that's fine. Simply adjust the parameter t1 or t2, or Tend. Your converter will use the switching frequency of your choosing, and you can define the switching frequency by defining the switching period Ts, also in the section of simulation commands and parameters. And then finally, an important box in this section, is the box where we define the scale factor between the inductor current and the flux density. We refer here to the lecture on non-linear inductors in LTspice. The scale factor here is the product of n and mu_0 over the length of the gap lg, and this is going to give us the ability to automate the checking of whether your inductors are saturating or not. Now it is going to be your responsibility to make sure that these scale factors are computed correctly for your magnetic components. At the bottom of the simulation commands and parameters, we have setup of the simulation type, that's going to be a transient simulation in milestone one. And you can see that simulation goes from zero to Tend, where Tend is the value that you can define right here. One micro second is skipped at the beginning, and 10 nano second is the maximum time step that we can have. And that's done for convenience, so your simulation is likely to produce accurate results. We use switching.lib library and we also set this reltol parameter to a suitable value. There is no need to change anything in this section. This is the section where the control sources are defined. These control sources, again, are the sources that define functions of the power management system. Those control sources are defined as piecewise-linear sources with values that you can set to your liking. The values associated with the control 1 signal are called Vref1. And those have one, two, three different values that corresponds to three operating modes. So for example, let's suppose you want your converter to be in steady state at time equal to t1, with five volts at the output. You can use the value of Vref1_5V as the value that sets the duty cycle for your converter so that the output of five volts is produced in steady state, and so on. So, importantly, in milestone one, use the control sources that are modeling the behavior of the power management system as the inputs to the pulse width modulators that set the switch duty cycles to exactly such values that the output is equal to the desired operating point. Now we say, set the duty cycles which really means that you may have more than one converter in your design, or you can have one converter that has buck and boost capabilities, it's your choice. But you can use up to two of these sources, Vcontrol1 and Vcontrol2 are available, not more than that but you can certainly use just one of them, and not do anything with the other. These control sources have predefined 100-ohm internal resistances, and they cannot be used to provide any meaningful power in your design. Here is an example of how these control sources may be arranged. So at the beginning, we set Vref1 and Vref2 to the values that will in our converter produce five volt output, and that lasts up to t1. Then we have a transition of 0.1 millisecond to Vref1 and Vref2 that correspond to operation of 20 volts at the output. And then finally we have the two values defined for the case where we have the power flow in the opposite direction. So the sequence of events in milestone one, for your converter will be first operation at operating point 1, Then at operating point 2 and finally, operating point 3. At the end of this, each one of these intervals, we have a period of time that consists of ten cycles, ten switching cycles. That period of time is going to be used to measure the average value of the voltage or to measure the ripple. So it will be your responsibility to make sure that your converter operates indeed in steady state at the end of this time interval, t1, in steady state at the time interval, t2, and in steady state at the end of simulation. All right, now, that is directly related to a number of commands that are provided to measure performance of your circuit. You can go through the details of these commands and in fact you should, to see exactly how different parameters are going to be measured to verify performance of the circuit. As an example, let's look at the time t2. We would like to find out whether the output voltage of the converter at this time is first of all in steady state, that should be a visual inspection of the waveforms. And second, what is the average value of that voltage? Well, first of all we define this time right here as the beginning of this OP2 interval, this time here as the end of the OP2 interval, so those two times are defined right here. And then, in that time interval, we have a measurement command that computes the average value of the output voltage from the beginning of the interval to the end of the interval. There is nothing you need to change in the measurement commands. Except, if you have more than one inductor, then you need to include the Bscale factor for the second inductor. If you have more than two inductors, that's fine but you need to add additional lines for the measurement of the flux density in each additional inductor. The most important point about any of the milestones in the capstone design is to very carefully review the corresponding document that spells out the rubrics for grading. You will be grading the design of other people but the best thing to do first is to review this grading rubric so you know exactly how to design and track your converter before you submit your work for grading. This is just the beginning of that Milestone1.pdf file. I'm just showing this to emphasize the point that this is perhaps the most important document to review very carefully. There are a number of pages that follow with a number of additional rubrics. We look at the particular example of a boost converter that is arranged in exactly the same manner as what we would expect for your circuitry. So on top of the schematic, there's the header, and the bottom of the schematic is the actual circuit. When you're asked to upload a screen shot of your schematic, please do that only for your actual circuit. There is no need to upload the header. It is your responsibility to use the header as provided with the parameters you may want to change according to your design. So here is the boost converter example and we're going to run it through the rubrics and see how well we actually designed the circuit. Notice the input port is called in, the output port is called out, and there is only one control signal used right here. And that control signal is what sets the duty cycle for the two switches in the boost converter, which really means this converter is indeed bi-directional. The power can flow from input from the battery to the USB or the other way around, and so we have a bi-directional power converter in place. The first rubric associated with grading this design is a question whether the approach is briefly described and is schematic included. All right, we have included the schematic right here, but then, there is a question whether the approach shown is capable of operating at points 1, 2 and 3 described above. And those are points of 5 volts, 20 volts, and 20 volts charging. When you grade someone else's work, you choose one of these two answers. It’s either Yes or No. Yes is worth 70 points, No is worth 0 points. So what do you say for this design? We have a boost converter from battery to the bus. There is no way that boost converter can step down the voltage to five volts, and so we're now going to be able to operate at operating point 1. So, operating point 1 is not available. In this case here, it would earn 0 points for the design. Let's plot transient simulation waveforms. What is shown right here is v(out), and the inductor current, iL. And we have these time intervals next to t1 shown right here, t2 shown right here, and the end of simulation shown right here. At t1, the converter is supposed to produce five volts, but it's not able to do that, and so this is not going to be a valid operating point. At t2, the converter is supposed to be in steady state and produce 20 volts, and that's okay. And finally, at the end of this simulation, the converter is supposed to be in steady state, and the bus charging the battery, and indeed you see here the inductor current in fact is negative. We have adjusted skillfully the duty cycle in this boost converter to operate in the opposite direction as a buck converter and charge the battery at the current that is on the USB side equal to 3 amps. So, when you grade someone else's work, you would do a transient simulation and inspect the waveforms so you gain understanding of what the circuit is doing and, in particular, whether it meets the requirements of operating at this steady state operating points, at t1, t2, and Tend. You may also notice here that we have pretty severe saturation of the inductor. So this design will not pass milestone 3, where the current-limiting is required, and the inductors are not supposed to saturate. In milestone 1 we allow that. All we care about is the steady state converter design. You will do the control design, and verification of the final switching circuits with control design in milestones two and three. So the rubric related to these waveforms at time t2 is the converter in steady state at operating point 2, which we are going to measure through this value of Vout_20V. Is that measurement in the required range of 20 volts plus or minus 0.1 volt? And we'll find out in the next page that indeed that is the case. And so in this case, here, we would earn 5 points on that particular rubric. And finally, lets see how the measurement results are going to look like in this example. Once the simulation completes, you can view the measurement results in the SPICE error log. Scroll down that file and find the section where you see the measurement results. To open that file, you do ctrl+L on a PC or command+L on a Mac. So, the front part is where we define times, and that's great. You can see for example this start of the five volt operating point is 0.9 milliseconds. The end of that is 1 millisecond. And that for the converter that is switching at 100 kilohertz is exactly 10 periods. And we have such time start and end defined for the operating point two and the operating point three. Right, let's look at the results. The vout_5v, that is supposed to be the average value of the bus voltage at the operating point one, it should be 5V +/- 0.1V but our result is far from that because we have a boost converter that's not enable to produce or reduce the voltage to 5 volts. And so this is not good, and here we will earn 0 points. Now the second operating point, we want to be between 20 +/- 0.1, and our result of 20.0082 is great. And so, we're going to earn 5 points right here. Now we also check ripples over the same steady state time intervals, but we do that only at the operating point two. And so we have the input voltage ripple, that's right here, it's supposed to be less than 0.1 volt. What is it? Well we have 0.112, so it is greater than what is allowed. And so, we would earn 0 points here as well. That simply means our input capacitor is too small. On the output side, however, our ripple meets the requirement and so we will earn five points for that. Now, the next line checks the maximum flux density through the inductor. In this case here, we have just one inductor and so there is just one measurement line. If you had more inductors, you need to have multiple measurement lines, one for each inductor. The maximum flux density in steady state operation at operating point two is found to be about 0.2 Tesla, that meets the requirement of less than 0.33 Tesla, and so we earn five points for that rubric. And finally, that is a calculation of efficiency. It's automated. So efficiency is calculated as output power over input power, at the operating point 2. And the result obtained is 96% for the boost example; that 96% is a good result, and that will actually earn full 10 points in the rubric. You will see the rubric for efficiency actually has several different values. The higher the efficiency you have, the larger number of points you will earn. The final point is the check whether the charging current from the USB bus at the operating point 3 is 3 amps plus minus 0.1 amp. If you look at the measurement result and you see that's okay and you earn points for that rubric. So this is just an example of how the grading is going to go, but again, this is also a very good guide of how you can check your design before you submit your work for grading. And finally, a couple of important notes on submission of your work and for peer grading. An important point is, you will be allowed to submit your work only once. So, make sure that everything is correct and complete before you click the submit button. Why is that? Well, it is related to the fact that these works are going to be peer graded so there has to be a point where the submission is available to other learners to look at, and you cannot make updates after that, after someone has already started looking at your design. So bear in mind that you will only be allowed to submit once. And again, make sure that everything is fine and correct before you click on the submission button. As I already mentioned, it is very important to very carefully review the rubrics in the Milestone1 document. Rubric can be used through the entire design process to make sure that you're meeting all the design requirements, and you can actually score yourself, and have a good expectation of what scores you should expect from your peers. You will be asked to submit your work and simulation files to be evaluated by peer graders. When you prepare your simulation files for submission, make sure that you include all necessary simulation files. This is very important. Do not assume the grader has a library or doesn't have a library. Include everything that is necessary to run your simulation. It is also your responsibility to make sure that simulation converges and completes without errors. Do not include any raw files. And do not include your results in the submission because the raw files are very large in size and they really are not going to matter at all. The grader will have to reproduce your simulation anyway and so the raw files are not going to be necessary. You will collect all the files you need into a very clean folder, zip the folder and upload the zipped file. And that's going to be the submission of the simulation of work. Upon submission of your work, you'll be required to grade submissions by three other students. Many students choose to grade more and you will be offered opportunities to grade more than three if you wish to do so.