Hi, my name is Ali Shehseva and welcome to this breached digital ST digital PFC design webinar using STM32 Throughout the next hour or so we're going to talk about why we need power fact correction or PFC And then we're going to look at PFC operation at the block level And then we talk about each main building block power stage voltage loop current loop Voltage feed forward and so on and then we look at the digital implementation of our PFC and then we will do a complete design using breaches PLD design software. This is available free for all the SD customs and This software effectively designs almost everything for you including the sizing of the power stage components and the control loop coefficients in digital domain and then finally my colleague and friend Dr Michael Holworth is going to show you some fantastic demonstrations and some experimental results on how we get everything working on the setup that we actually use in our digital power and digital PFC workshops with SD So why do we need power factor correction? Basically because non-linear loads draw non-linear currents And you'll see shortly that this will cause an enormous amount of problems Unfortunately, almost all power electronic power converters fall in this category and that will result in large harmonic currents And a poor power factor is only a byproduct of these harmonics that we are effectively injecting into our system So non-soluble current drawn by these non-linear loads have many disadvantages They result in the deformation of the voltage waveform So those of you who have looked at the mains voltage waveform You'll see that it's actually rarely a sinusoid many times is quite Crop top triangular shape and that is because of all these harmonics that our various products are injecting on the line and They result in higher i-squared R losses on the utility side of the grid That is before the meter and that means that the power company cannot charge for it And of course, they are not terribly happy about this the charge in larger RMS currents And that means that they need to install thicker conductors Certain harmonics such as triplet harmonics can go down the neutral line and can be quite hazardous So in order to make sure that we don't face these Disadvantages there are international regulations such as in the 61,000 3-2 from let's say European Union that prohibit us from drawing Too much non-sinusoidal current and power factor correction is just a way that we use It's a method that we use in order to make sure that our current that we draw is not peaky and full of harmonics But instead it's sinusoidal like a resistor. So if you consider our system will look something like this now We have Our mains voltage 230 volts First we rectify it using a bridge rectifier and you see this rectified sine wave over here And then we put it in a in a whole bunch of bulk capacitors DC link capacitors and we end up with a loosely hardly regulated DC link voltage like so it's a DC voltage at the moment actually there's no regulation and then and then you have your appliance now If this appliance was just a resistor if it was just a heater for example Would we still need power factor correction and that is yes We would because the problem is not with this load being resistive The problem is over here the way we rectify bar sine wave and then we store the charge into this capacitor So let's have a look at this in a little bit more detail. I have got the setup here I've got a bridge rectifier I've got a capacitor and I've got a resistive load here now The green line is the capacitor voltage and the red line is a line voltage So the red line is here and the green line is here And you can see that as long as the red line the voltage on the line is lower than the capacitor voltage Right the current is coming out of the capacitor and is feeding our load Okay, but no current can go this way because the potential across the capacitor is bigger than the potential of this line You see the green line is higher than the red line now During this period from there for from there to here the capacitor is feeding the resistor When the capacitors feeding the resistor is getting discharged and you can see that because the green line is coming down This is the capacitor voltage going down as we feed our resistor Now what happens then is that at exactly this point here the line voltage to red line goes Above the capacitor voltage at that point you have got Massive current flowing down here from the line down to here in order to recharge the capacitor you can see that the capacitor Recharges and follows the shape of the line voltage, but more importantly look at what happens to the current a Massive burst of current from there to there Starts flowing into the capacitor to replenish it of the energy that it has been Supplying the load and this is the bit that is a problem Okay, so let us look at this in a little bit more detail here I've got my line voltage rectified right in an ideal world if you just had a resistor without the bridge Driven fires and without the capacitor a resistor would take a sinusoidal Current like so and we know that power is voltage times the current and therefore you can see that we deliver power during this entire period okay, so This is for a pure resistor. That's your line voltage. That is a line current with a pure resistor Okay, and we take this much time To deliver a certain amount of power Now because of the action of the bridge rectifier and the capacitor just like we saw because we only use this Period here to deliver the same amount of current What happens is that during this period and this period? We have to deliver exactly the same amount of power that we delivered during this entire cycle and Therefore the current has to be much bigger because we're only using a short period of the cycle to actually Feed our capacitor and of course that is a problem if the current flowing into the capacitor is this high Instead of a resistive load which would look like so then the conductors have to take into account that the peak of the current is higher RMS of the current is higher these sharp edges have got much more harmonics, which we know that we have got some problems with and That is why we need power factor correction So effectively all a power factor corrector does is that it forces us to draw a current during the entire cycle Like your resistor as opposed to let the current go wild and go massively high like so, okay So here is a real example of a real measurement here I have got my voltage and here you can clearly see The current that is flowing into the capacitor and it's only It's only taking this long in order to charge the capacitor so that we can deliver the power over the entire cycle So how does active power? Factor corrector operates. Well the first place a PFC stage between the diode bridge and The bulk capacitor we actually then can reduce the size of this bulk capacitor quite significantly and then We put a diagnostic converter afterwards. So our buck converter flyback converter, whatever it is Will then convert that note that the output of this will be around 400 volts in case of an active PFC But it's poorly regulated in terms of the voltage. So this is not a stiff hard pork for 400 Big about a 400 volt DC link, right? This is quite badly regulated But we don't care because the job of the power factor corrector is not to regulate the voltage The job of the power factor corrector is to make sure that the current over here is a sinusoid The job of the downstream converter is to regulate the voltage So so when we place our downstream converter This will provide us with a stiff well regulated voltage which our load requires Okay now As I mentioned earlier, it's important to note that the job of the PFC is not to control the voltage It's job is to control the current. Okay? Okay, so you get poorly regulated distorted voltage over here But beautiful sinusoidal current over here just like a resistor and then you get clean regulated isolated voltage over there Now the most common topology that we use For PFC is the boost topology and in this webinar We're going to talk about continuous conduction mode boost topology It is suitable for PFC applications because we can operate over the entire universal voltage rate. So we can go from 85 volts Which is the lowest voltage that we expect to get in the world In an ac line to 265 volts, which is the highest one that we expect to get Now input current is not switched as you can see That's a good advantage because the switch is here input card is got a massive inductor orient And of course, we know that inductors don't like big changes in current So the fact that we have got a inductor heat actually helps us the switch is on the low side So the voltage across the switch is not too high And we need a cheap gate drive and therefore it's a quite a suitable topology In the boost inductor the input current is the same as the The inductor current and that means that if I changed a duty of this I Can control the current. So if I change the duty of this I can control the input current and that means that I can control this in order to force the input current to be sinusoidal, so by varying a duty we shape the input current into what we want And of course in order to do that we need some control loops. So Effectively what we're doing is we are putting a rectified Sine wave that's our voltage across the input of our boost converter Then we control the duty of this Like so in a kind of a sinusoidal manner, right? And as we do that we force the shape of the current to be sinusoidal And that makes it look like a resistor and you can see if you actually zoom in you're turning a switch on So we switch off turning a switch on turning a switch off and by varying the duty You force it to go up and down for now. Let us ignore the voltage loop. So for now, let's say that we're not controlling the Output voltage at all Therefore we are free to do what we want with this switch and all we do We don't care what's happening here for now All we do is we vary this in order to ensure that this is in phase and Same shape as that. Effectively it makes the whole thing look like a resistor so We have got a current loop therefore in order to shape the current and later on we talk about the voltage loop Because we don't want the voltage to be completely uncontrolled We want to have some control on it and we'll talk about that a little bit later So for now if we just talk about the current We need to generate a demand duty and we do that from the input voltage We want our demand current that goes into the current loop control To be the same shape. So what we do typically is we take a potential divider We take this rectify sine wave and we say to the control loop You know what? I want my current to be exactly the same shape as this rectify sine wave So that goes into the control loop then we measure our current So this is the current shape that we want this is the current shape that we're getting We compare these two together and that gives us the error signal that gets that gives me the difference between the current that I want and the current that I'm getting and then that goes into a Compensator now in analog that is typically just a type 2 Compensator in digital that becomes a 2 pull to 0 We have discussed this in one of our previous videos and of course PLD will Calculate everything for you now for now all you need is the fact that this is a compensator that is going to compensate and ensure that this Actual current follows the demand current. So the current demand current Sorry, the current error goes into the PWM the pedium turns on the switch and the switch controls the input current And there we go our current loop is control is closed But we still don't have any control over the output voltage. Okay? As I mentioned earlier the PLD will design this loop for you And therefore we're not going to go through the detailed design of this within this shorter webinar In fact in our workshops, we do discuss how you calculate everything and how you control your current so We have closed the current loop which is the inner current loop over here And now we're gonna have to close the voltage loop because as I mentioned earlier up until now We've been ignoring the output voltage. We say, you know what? We don't care But we do we need to somehow have a little bit of control over it Okay. Now we take the output voltage We pass it through a potential divider and then we Compare it to a reference voltage typically what we ask for the output voltage to be around 400 volts usually 375 385 volts So this is the voltage that I'm getting I'll talk about these harmonics later So this is the voltage that I'm getting this is the voltage that I want 400 volts I compared to together. So this is the error and again that goes into another Control loop and this one is the voltage loop the voltage loop takes the error signal and Compensates it we call this VA out voltage amplifier output again That is a type 2 compensator in analog world again. That becomes a 2 port to zero in digital world again We have had a many videos in fact on these and how you design them I mean discuss them in a workshop for this short webinar We are going to use PLD and PLD will design everything for then what we will do is we will multiply this With that so effectively the output of this voltage loop is only scaling this demand current our demand current is a sinusoidal erectified sine wave and the voltage loop will just Increase or decrease its amplitude. So for example if The output suddenly starts drawing too much current this voltage here would fall down Because this is the negative feedback loop as this will fall down this VA out will go up So you multiply this current by bigger number and therefore you get bigger current and that's exactly what we want a negative feedback There we go, and that is what we're doing and we have closed both loops So now we've got an inner current loop and an outer voltage loop and that gives us a little bit of control over The output voltage, but because the main job is to control the current You don't want this loop to interfere the performance of that So typically the crossover frequency of this is 10 kilohertz very fast very quick transient response and You cannot make this fast because if you do then you mess this bit up And of course our job is to shape the current so that this one is extremely slow around seven to ten hertz Okay, and because it's such a slow loop you end up with having some second harmonic ripple now in the In Europe second harmonic of hunt of 50 hertz would be 100 Hertz and in United States and North America Canada, it will be around 120 here So here you've got let's say hundred Hertz of ripple now this causes us a problem because This is being used in order to generate the demand value of the current And of course if this has got second harmonic on it We end up demanding second harmonic and therefore one of the jobs of this voltage loop is to attenuate this 100 Hertz error signal because we don't want to add extra hundred Hertz on top of this It will it will reduce the performance of the whole Okay, again as I mentioned earlier PLD will design the loop for so let's have a look at the next building log And that is the voltage feet forward filter We have a problem with the way that we are doing this in that our demand current is Being generated from the input voltage Okay, now because you're trying to deliver constant power In a normal let's say DC DC converter if the vote if the line voltage Falls down the current has to go up in order to make sure that the amount of power that we deliver is the same Okay, however, look what happens here if the line voltage goes down the demand current also goes down And that is exactly the opposite of what we want If the line voltage goes down in a pfc to deliver the same power we have to force this To go up so that again we deliver the same amount of current and the part of the circuitry that does this is called the voltage feet forward filter again in the Workshops we go through a lot of details of how this operates and and how it actually works And how you design one for the sake of this short webinar We just use PLD and PLD will design everything for you. So As I mentioned earlier Ideally in our pfc we would like the input power to stay constant but this is not the case because of The fact that the current shape is being generated from the input voltage shape And of course if that goes down the current will also go so down and we use the Voltage feet forward filter. Okay. Now at block level then we have got a boost converter We have got some gain again You need to take into account within Your control loop you have got some gain Then you have rectified this now That goes into an ADC Okay, so we take Samples of this because we need to start doing all those calculations that I told you now here is the sampled version So you are sample sample sample sample sample sample sample and then you scale that was something called kv in then After you've scaled this you end up with a constant which is that scaling factor and a sine wave in Discrete time so it is sample sample sample sample sample and it's following the shape of the sign then This is the part that does the voltage feet forward section So you pass it through a digital low pass filter again WDS will design that for you You multiply it by 1.1 and we do that in the software. We've got all the software libraries That's that that will do all of this for you and then we have to square it And that is called the voltage feet forward calculations that you have to do right then we take our output voltage Remember, we've got a control loop on the output voltage again. We put that through an ADC and again, this was the original continuous time version This is the discrete time version so we've taken sample sample sample sample and so on that goes through another scaling factor We compare what we want with what we are getting that is the real voltage now It's sampled that is the demand voltage. That's inside of our code and the difference between these two is the voltage error As I mentioned earlier in the analog world, we put that through a Analog compensator here now we put it through a digital compensator and that is a two port to zero compensator PLD will calculate everything for you all the coefficients and so on and that gives you v a out Remember that was the scaling factor that just scaled the rectify sine wave for the For the demand current then finally you calculate this so you take this Value, there we go. That's here.  Just like we do in our log world and then you divide it by the square of the RMS voltage And what you have done here by low pass filtering multiply by 1.1 and the squaring is actually you have created this input voltage squared and This is the voltage feed forward term. Okay, the output of this is The demand current I am out Okay, so now we have created something that is taking into account the shape of the shape that we want this Rectify sine wave we multiply it by the output of the voltage loop and we divide it by the voltage for Feed forward filter term and that is the demand current now. We have to measure the real current So here we measured a real current again. We have got a game term now this is the Current that we want this is the current that we getting if you remember we now have a current loop So you sample this You Scale it this is the current that you want. This is the current that you're getting now They are both in discrete time in digital domain You subtract one from the other and that gives you the current error and then that goes through the current loop Which is another to pull to zero again PLD will calculate all the coefficients for you again from our other videos You know, you will know exactly how these compensators work and then You scale it again and then finally you have got your PWM and that is the one that we feed into the Switch and therefore Everything is we've closed the loop So we have got the close the voltage loop We've closed the current loop and we have looked after voltage feed forward filter And this is a type of setup that we use in order to implement the The the in digital domain at digital PC So if for now we ignore all the scaling from previous lies You can see that we need to design one digital voltage controller. We have and that is just a Type-2 controller one digital current controller again, that is the PLD will design up for you. That's the current controller We have not designed them in analog. We do this in the workshop And For this for this case of this short seminar We have taken them all out and then we have designed one digital low pass filter and that is the voltage forward term So of course a steepie LD will calculate all of these for you and this is in fact available for you For free from this link over here Okay, now consider our filter in real life Now we have An absolute maximum peak voltage of 375 for universal voltage. We have scaled it down to 3.3 volts Okay, so what we haven't discussed so far is all the scaling. So we took 375 And we scaled it down with a potential divider So we need the scaling factor of one over 114 Right here for our potential divider. So everything that we discussed right is off by factor of one over 114 okay, and therefore There we go That's the gain of this potential divider in order to put everything back You have to anti-scale everything that you calculate. So in your code you have to multiply by 114 to negate this over here, right? Then let's look at the ADC. ADC takes a voltage from 0 to 3.3 And gives a number between 0 to 4 or 9 5. So It has a scaling factor of 4 or 9 5 divided by 3.3 So everything that we have done is off by this scaling factor So so to negate this you have to anti-scale it by reciprocal of this, which is 3.3 divided by 4 or 9 5 So 4 or 9 5 divided by 3.3 in your code you multiply by 3.3 divided by 4 or 9 5 The multiplication gives you one so scaling becomes one and therefore you anti-scale it effectively Okay, so that's the gain of the ADC And so on so that means that our result is wrong by this scaling factor and that scaling factor So what you have to do is anti-scale all of these okay Now let's talk about it. This is scaling a little bit more detail. So we started here. We have got G3 which is the scaling factor over here And we have got a scaling factor for the ADC which is 4 or 9 5 divided by 3.3 So what we have to do is anti-scale that by Exactly the opposite. Okay one over G3 times GADC So If we have a look here what the scaling factors we have we have one a scaling factor there one a scaling factor there One scaling factor there one scaling factor there Uh, where's the next one? Yeah one scaling factor over here One a scaling factor over here And you want a scaling factor over here and you see that you've got a whole bunch of scaling factors Again, we have written library functions that deals with all of these all you have to do is know what This resistor and that resistor is calculate again You put this in the library functions that are available for you and all the scalings will be looked after for you okay, so Again in the workshop we discuss exactly how you negate all of these but for the sake of this Short webinar All you have to do is when you look at the code samples that we give you and they're in fact named exactly the same When you see g2 when you see g3 all you have to do is work it out and type it into code and everything else will be calculated for This is some experimental results for you now then This is the rectified input voltage right This is the current the blue trace is the current The green trace is the input voltage This is the rectified input voltage and you can see that the current is following beautifully the the the voltage It's a bit noisier because we're actually switching we're forcing it to shape like to be to be shaped like a sinus So it if it were a Resistor obviously this would have been clean and then finally this is the output voltage That's around let's say 400 volts or this is the low voltage board by the in our workshops Because we cannot deal with 400 volts because it can hurt the attendees We have designed this special board specifically for our workshops whereby we have divided everything by 10 So you put in 23 volts sinusoid and you take out 40 volts dc And this is the workshop that we use on our in our workshop so that you can have some real hands-on experience You really code this you do calculate everything you do some real measurements on this board And there we go here is your output voltage and you can just see That is not quite as straight and that is because it has got that second harmonic superimposed on top of it And then if I look at it on my oscilloscope I looked at the harmonics These are the harmonics with the power factor switched on you can see now that the voltage and the current are both sinusoid And you can see that this is my switching frequency and after that the harmonics fall down quite significantly If you measure the if you decide to measure the loop You should really measure both the voltage loop and the current loop. We do that using Omicron's Body 100 we've got some great videos on how you measure the loops of of power factor characters On our on our website and this is a type of result that you'd get remember. I said that the The the voltage loop is usually very slow at around 6 Or 7 hertz 6 to 10 hertz and there we go We have here designed for 7 hertz and we've got 60 degrees of phase margin So it shows that the design using pld is actually this is a real measurement. It is giving us very good results Okay, so I am now going to switch over to st pld and I'm going to design one step by step all the way and After that I will pass on to michael who will show you the experimental results So let's go to st pld Okay, so when you open up st pld again, you can download this directly from our website You provide it with the The voltages that you want so the minimum voltage for universal voltage. That is usually 85 volts nominal voltage, let's say is 230 volts for the european union maximum voltage, let's say 275 volts Frequency in the european union that would be 50 hertz in north america that would be 60 hertz Of course en 61 000 3 dash 2 is a european union standard and therefore we go at 50 hertz Let's design it for 250 watts And let's use switching frequency of 200 kilohertz Then the output voltage i have been saying 400 volts is typically 375 to 385 let's stay with 385 volts and then hold up time is The period of time that you're going to assume that the line can go down And then come back up and we're saying that the hold up time is 20 milliseconds. So it's one cycle So in within this one cycle How low are you going to allow the output voltage to fall our output voltage on the normal conditions is 385 after 20 milliseconds of line going down I only Allow it to go down to 335 volts. I don't want it to go down any lower Okay, and that of course determines the size of the output capacitors. So by typing this number here You that the software will automatically calculate the Output capacitors for you and you can see here based on what you have given it If we allow 15 percent ripple current ripple It will allow it will It has calculated the inductance to be around 500 microhenry. So let's say 500 microhenry and then it is take it is Given us 278 millifarads of capacitance and that is based on this hold up time over here Okay, it also gives you the stresses on the components so that You know the current ripple on the capacitor and the the voltages and so on and therefore you can go and Buy the correct size of the capacitor and the inductor then In the case of our digital power supply Let us use let us say that we use a current transformer with a turns ratio of 1 to 100 And then the peak return current is around four amps and let us say that we are going to allow We would like a voltage to appear on our ADC pin This is the voltage across the burden resistor of the of the current sense and if our ADC is 3.3 volts I would usually go for around 2.5 to 2.8, but for simplicity, let's say that we want three volts And as soon as you type in what voltage you are going to allow on the pin of the ADC It calculates the exact size of the burden resistor. So look at that if I change that to 1 It says you need a burden resistor 24 if I change that to 3 It says you need a burden resistant resistor of 72 And what this means Is that at the peak of the current The voltage that will appear on the ADC pin that is sampling the current Is going to be three volts if you solder in a 72 ohm resistor And it's calculated the current gain for you if you remember from when I was talking about all the scaling and all the gains Current gain is one of those gains that you need. So you just go and put that in your code It's already working out to be 0.721 okay, then In the multiplier section, we're going to have to tell The software how much harmonics we are going to allow and of course that Represents whether we pass or fail now the more low you make this Harmonic the lower you make this harmonic there harder it is to Design the compensator you have to have a higher crossover frequency and so on and it makes life more difficult So ideally what you want to do is pick a Certain amount of harmonic that just allows you to pass the test With a little bit of margin right 0.75 third harmonic permitted as a result of the voltage feedforward is not a bad number um, then it works out the voltage feedforward gain if you remember the voltage feedforward was a Low pass filter you saw that on the block diagram So it is taking these values and it works out the cutoff frequency of the filter that you need to design Not only that it actually works out the coefficients of this digital filter And of course in the sample code that we provide for you You there's a section whereby you just need to paste these in and then you end up with a 10 hertz 10 hertz low pass filter. Let's say I was going to allow one and a half percent Of harmonics third harmonic due to the voltage feedforward filter Okay, then you can see that I can then get away with a filter with a higher crossover frequency Which is 15 hertz again. It has calculated the coefficients for me. All I have to do is copy to clipboard You go to your code. Michael will demonstrate this for you Um, at least the entire code and you just paste in these coefficients and there you have it You have the voltage feedforward filter Okay, then let us go to voltage loop. I'm here looking at the voltage loop I'm looking at the plant and the loop, but I only really need the look for this demonstration This is the loop. I have got the crossover frequency of seven kilohertz and I've got a phase margin of 60 degrees I've got very good gain margin and a very nice slope again And our other videos we just we describe what is a good body plot for a stable control loop I've here set this to seven hertz crossover frequency, but I can change it Let's say if I do 10 Or if I do 100, please don't go higher than 10, but you can see that as soon as I change It will redesign everything for me. It gives me new coefficients and also gives me a warning saying a Your crossover frequency for the voltage loop is too high. So let's stick with 10 60 degrees of phase margin and with 60 degrees of phase margin It is estimating that I'm going to end up with 3.5 percent of second harmonic on our output voltage now that might be a little bit too high. So let's Let's see if we can get away with seven Look how quickly how it calculates it. So if I have a crossover frequency of seven hertz, I end up with 1.7 percent of um Harmonics on my output 10 gives me three four point five percent Okay, if I go to stay with seven And of course that manifests itself on the input current as naught point eight five percent of third harmonic and It's calculated the poles and zeros and it has calculated the coefficients. I copy this And again in a sample code that we give you All you do you paste it and that is your voltage loop completed Finally current loop as I mentioned earlier on a current loop Needs to be much faster because the job of the Of the pfc is to shape the current and not control the output voltage. So this is my input current You typically want a high crossover frequency 10 kilohertz 50 degrees of phase margin again. Have a look at oh, you need to go to frequency response of the current loop I Look at the loop only Have a look at this if I do five kilohertz it automatically Redraws and recalculates all the coefficients. So let's stay with 10 kilohertz That will give you a relatively nice sine wave in time domain 50 degrees of phase margin 200 kilohertz is my sampling frequency which happens to be the same as my switching frequency And then The way we structure our code is that there is a total delay of half a sampling interval So if you use our code that has to stay at north point five if you use your own code and you've got different amount of delay Then Of course in the workshop we go through a lot of details on how you make sure that you get this bit right Otherwise you may lose a lot of phase margin And then finally based on this data it has calculated the Current loops coefficients Which I can go and I can paste again into my code again. Michael will demo the code for you. This is The coefficients of the current loop and Our design is effectively complete. So to summarize, uh, we discussed, um The uh, bedlam books of the, uh, pfc we discussed the setup in digital And then I have just now designed everything voltage feed forward voltage loop current loop and so on And now I pass you over to my colleague and friend Dr. Michael Holworth Who's going to put all of this into practice and show you how it will work in real life Show you the code and actually show you the experimental setup and give you some experimental results Thank you very much for watching. Uh, this is the end of my section and Michael will take over from that Okay, thanks ellie. So in this half of the webinar, we're going to look at some experimental results using our Uh, digital pfc start kit. So this is the start kit that we use in our workshops It is a, uh, low voltage digital pfc start kit Um, it's obviously we don't want people to hurt themselves in our workshop So effectively what we've done is divide everything by a factor of 10 Um, so the input voltage is 24 volts ac Output voltage is 40 volts dc Um, this is a ccm boost pfc and there are two phases so we can do interleaved ccm boost pfc Obviously you can see the resistive load here. We have a Roughly 16 watt load bank here Which you can control using the switches or using the MOSFETs And the st nuclear card just plugs directly into the starter kit. So it's a complete kit That allows us to do design development work at safe load voltages It's very useful because then if you're doing some development work, things won't pop dramatically So yes, that's the board we're using All we need to do now is look at how we implement the digital pfc in terms of code So what do we need to implement on our digital pfc today? Well, looking at this block diagram We have our boost power stage here And we're going to use the adc to sample several points We're going to be sampling our input voltage scaled down by a factor g3 Sampled by the adc and then that gets passed through our digital low pass filter It gets scaled by a factor of 1.1 and then squared to give to convert from average to rms and then rms squared The other The input voltage is also used as our v and peak sine omega t term So that's our to be our rectified sine wave shape And that is so that our current tracks our input voltage in a sinusoidal manner Um, we also sample our output voltage Scaled down by g4 sample using adc That gets compared with our reference and the error term is passed through our two pole two zero voltage loop controller Then these three inputs are used as inputs to our multiplier That which is this block here And the multiplier output is our demand value of current For that switching cycle So we also sample our current, of course And there are multiple ways of sampling the current you can sample the return current like we're doing this diagram Or you could sample the switch current with a some kind of current transducer in the One of the legs of the MOSFET So we sample the return current here scaled by g2 That gives us our sample current we compare that with our demand current, which is the output of the multiplier And that gets passed through our two pole two zero current loop compensator And then that gives us our new value of duty cycle Uh, so you'll notice here that there are several gains. So we've got g2 g3 and g4 And then we have Some blocks in our diagram So we have this gain here Which we call kva out and this ensures that The demand current value Is in the same units as a sampled current value So you can see our sampled current here is g80cg2 And the output of our multiplier our demand current also needs to be in the same units g80cg2 And we go through this in a lot of detail in the workshop, but Effectively We if you multiply the output of our voltage loop by this gain kva out, that's what we get Then we need to negate these games before we Set our pvm pwm To ensure we get the correct crossover frequency of our current loop So we do one over g80cg2 at the output of our current loop compensator And in our code we call that ki loop. So we'll look at where those are in our code shortly Okay, so now we need to configure the STM32 chip We're using the STM32 g474 device today And to do that We are using STM32 qmx Now the setup is very similar to the Setup we did in the digital power dcdc webinar a few weeks ago So we won't go through it in as much detail The only real difference is that we are sampling more channels Without adc in our dcdc webinar We just sampled the output voltage in this digital pfc webinar We're sampling as you can see here Uh our input voltage or output voltage Our return current and down here the Switch current so iq1 and iq2 for the two phases that we have on interleaved boost Um So there are more adc channels to configure So We are using adc1 to sample our input voltage and output voltage And adc2 to sample our currents So let's take a look at adc2.currents We're not actually using the return current in this example We are just using the switch current So we have configured injected conversion mode with two conversions First conversion rank one is channel three Which is this one here the the uh fat q1 Which is one of the phases And then the second conversion is Channel four, which is q2 the current in the in the other phase Okay, so we are doing a ccm boost pfc Which means that we are using average current mode control So we need to make sure that the current that we sample is the average current Um, so for ccm as you can imagine We turn the switch on and the current rises then we turn the switch off and the current force So if we set our adc to sample in the middle of our on time That would be the middle of the the rise of our current That will be equal to the average current for that switching cycle So to do this we use the high resolution timer So we're using high res timer trigger two event to trigger the sampling of our adc So let's take a look at our high res timer high res timer here adc triggers And trigger two event is enabled And there are two trigger sources timer a compare for timer b compare for So timer a is used to control switch q1 So the pwm of switch q1 And then timer b is used to control the pwm of switch q2 So we're using the compare register on timer a and b Comparished afford To trigger the adc to ensure that we sample in the middle of the on time So let's take a look at timer a So timer a again, we won't go through all the configuration. We did that in the dc-dc webinar. Please feel free to take a look at that But effectively let's go down to the output configuration ta1 drives the pwm of our switch q1 The set event is compare register one compare unit one And the reset event is compare unit three We also have an external event to shut down the pwm in the event of a current or Pause in the debugger which we'll talk about shortly And then we said we're using compare register four compare unit four to Take the adc sample So you'll note that in the code here we haven't actually set the compare values Sorry in in keeping max we've not actually set the compare values because we're gonna do that in the code We have some digital pfc library functions That manage the setup of the compare unit so that we get the the correct control Sampling at the correct point which we'll look at in a moment So that's a high-risk timer What we do now is just press generate code and then that will open our selected ide We're using embedded workbench from iar as our ide today Let's just take a look at the main.c file So we've got some header files There's main.h which sets up the GPIOs Defines the GPIOs and then we have our digital power library function and our breacher pfc utility functions We're actually combining these into a new library digital power library That will be released soon. So please subscribe our website for updates Then we have a board specific header file. Let's take a look at this And in this board specific header file, this is where we define the games. So G3 g So g2 g3 g4 that we saw in the block diagram are defined here as well as kv8 out and ki loop So then further down in our main.c file We have our coefficients. So these are the coefficients that ali generated using pld We copy and paste them into our code. So we have the vff filter coefficients For a voltage feed forward filter Our voltage loop coefficients with a cross area of 7 hertz 50 degrees And our current loop coefficients with a cross area of 10 kilohertz 50 degrees We've defined our switching frequency as 200 kilohertz And our voltage loop frequency as 6 kilohertz And we define our design output voltage Overvoltage protection level under voltage protection level, etc We are using a data structure called that we've created called pfc data float to hold all of the variables needed to implement our digital pfc So that will be all of the two quality zero controllers The soft start The runtime variables, etc are all stored in this data structure Which we have called we created an instance of called my pfc So then we have the interrupt search routines. We'll look at them in a moment. Let's just scroll down to our main function first So here we have in main. This is where the microcontroller jumps to at the beginning of execution We configure GPIOs, ADCs Comparator DACs, etc This is all auto-generated code From cuba max Anything Inside these user code begin tags Is the code that we've inserted So this is code that we've inserted here We're turning off switches because on our Um start to get here. We've got some MOSFET controlled load banks. So we just set them to zero to begin with Then we have our digital power or digital pfc library functions. So here's one of them This config is our pfc controller pfc zero on config float We pass it a pointer to our pfc structure We pass it the switching frequency voltage loop Frequency and the soft start time in milliseconds Then we configure our current loop using this pfc zero on our loop float init function Again pointed to structure current loop coefficients min max duty Then we have our vff filter init function Pointed to structure and our coefficients for our vff filter And then we configure our voltage loop. So pfc zero one v loop float init Pointed to structure desired output voltage Converted to adc value using this macro Under voltage protection level converted to adc value over voltage protection level voltage loop coefficients min and max outputs for our voltage loop Then we set our Set up our pdbm and adc using this initialization function here And we set the number of phases that we have in this example We're going to do only going to do single phase. So even though we have two phases on our board for interlude pfc In this particular example, we're just covering a single phase So let's just take a quick look at this pfc init pdbm adc function This is what we want to look at so we mentioned in cuba max So this is our pdbm And we said that we're using compare unit one to set the output high so Compare unit one here sets the output high We're using compare unit three here to set the output low And then we're going to use compare unit four to trigger our adc so This sets up the uh the various compare registers to achieve this And we'll look at how we update the duty based on this uh functionality In a moment when we look at isr, but effectively what we're doing is up down count mode We're we're modulating both edges of our pwm So let's look at the isrs So isrs are our interruption routine and we have multiple isrs in our digital pfc system The first isr we look at is our fast loop. So the fast loop controls are current It runs at our switching frequency And we're using high res timer a To implement our current loop. So high res timer a interrupt will occur Every switching cycle so at 200 kilohertz We first thing we do is set a pin high so we can record on our scope when we enter the isr We clear our interrupt flag and then we read the value of our current And we store that in our My pfc structure Then we run our current loop controller. So pfc zero one i loop float Pass it the pointed to the structure and which phase we want to run So in this case, we're running phase zero because there is only one phase That will execute the two-poly two zero controller and give us our new value of duty So now we read that so my pfc I loop to pull to zero Which phase zero M out gets the value of duty from our pfc structure And then we divide it by two Why do we divide it by two? Well as we saw a few moments ago We're modulating both the trailing and leading edge of our pwm Using an up-down count mode effectively. So we need to split our duty between the trailing and leading edges And We then and That with this duty mask That's exactly what it what it says. It's a mask So if this was all zero then obviously the duty would be zero The mask is set to zero in the case of a fault. So over voltage under voltage or Some other fault condition the mask would be set to zero And that would shut down our boost power stage So then we update the compare registers using this macro here. Let's just take a look at this And we said that we're using compare unit one to set the rising edge and compare unit three to set the falling edge so all centered around the Center of our switching cycle. So I loop ticks as our switching period divided by two is the middle of our switching period minus the Compared the duty value divided by two Would be the rising edge and then middle of period plus duty divided by two would be the falling edge here And that means that we can always sample at the middle of our cycle to achieve our average current Then we set the isr pin low To mark the end of our isr The next is our we want to look at is a slow loop. So the slow loop runs at six kilohertz And in stm cube mx we set up timer d to run at six kilohertz So again, we set a pin high so we can measure the duration check it's running We clear a flag We read our input voltage We read our output voltage saw those in our structure We have a pfc waveform record function here Which we use in our workshop to display the variables in in the ide effectively on a scope We'll look at that here though Then we set the soft start or soft starting or soft stopping And then we run our voltage loop. So pfc zero on v loop executes all of the voltage loop. So let's just take a look at this So pfc zero on v loop inside this function, we run the voltage shoot forward filter We get our v in rms squared value We execute the voltage loop to put a zero voltage loop Then we calculate our multiplier scaling factor Then we check for over voltage we check for under voltage And then we update the soft start accordingly And we also update our duty mask Etc So it's all contained within that one function And finally we just set the output pin low so that we can measure the duration Good. Okay. So let's just run the code and test So We are just programming the device. Yep. So we're up and running And Now we need to turn on ac So to do this we are Several several ways you can do this. So you could use a ac source if you have one Obviously set it to 24 volts For the low voltage board Or if you don't have an ac source you can get 232 20 volt to 24 volt ac adapters or in the us 120 to 24 volt ac adapters There's actually quite a few 24 volt ac devices out there like cctv cameras and Doorbells, etc. Christmas lights. So they're actually quite readily available But if you have an ac source you can use this as well. So this ac source has been set to 24 volts Uh zero dc and let's measure the power factor Yes, so let's turn that on Okay, and we just need to turn on the probes and set the time base Okay, so we have On the screen here, uh our input voltage is channel three so 24 volt ac input voltage and the change of trigger yellow trace channel one is the Scaled down and rectified input voltage So now we just need to turn on our board and run our code So first we'll turn on the board And this is without pfc running. So pfc is not running So what we see now is a peaky waveform Rich in harmonics, which is what we don't want. So we're trying to avoid This is the typical waveform that you see When you have a bridge rectifier followed by some volt capacitance. So the block capacitance is being charged Towards the crest of the input voltage sine wave when the bridge rectifiers is conducting We have the output voltage from channel four The boost pfc is not running at the moment. So we're getting 20 volts per division. So roughly 30 volts On the output So now we can run our code and see what happens. So i'm just going to press run here go back to the scope And then pfc is running so i'll just turn on some load And you can see our input current Channel two is now a very nice sinusoid in phase with the input voltage With From the looks of it very very few harmonics other than the fundamental So that's good our output voltage Channel four is 40 volts Which is what we want and let's just change the load to see if our voltage loop is working So input current drops our voltage is still 40 volts. So our voltage loop is doing what it should do And at very low load We're in dcm for part of the cycle. So This notch here is when we're going from dcm to ccm As we increase the load then the waveform gets much better So we're full load at the moment. Let's look at our power factor so Let me move this here We have the power factor reading here from our ac source and we're getting Vectorly one power factor one, which is what we want. That means there's very few harmonics Um the blue button on the nuclear board has been programmed to disable the pfc So let's just press the blue button and see what happens So Our input current is now very peaky rich in harmonics on our power factor has reduced to 0.7 so The pfc is definitely doing its job Uh getting good power factor and few harmonics So that's good release the blue button and pfc comes back We'll go back to a power factor of one Okay, so let's analyze this in a bit more detail. We can use the nice features of our syglent oscilloscope to look at the harmonics so if we Turn on the math function f1 here We want to do an fft on channel two and we need to just change the time base of it Yeah, let's do that and we'll change the horizontal so we start at um Let's say one hertz And then we end at let's say one kilohertz We can then um turn on The table to look at our harmonic peaks So this is one hertz. So this is 50 hertz our fundamental And then that will be 100 hertz and then This mark two here will be our third harmonic 150 hertz and we're getting About minus 55 56 Oh Oh, sorry, I think the the the markers are moving So at the moment, it's the third homework the the third harmonic this one here minus 34 Yeah, two and three are switching so minus 33 Okay, so let's just see what happens to this harmonic here 150 hertz third harmonic When we disable pfc Let's disable the pfc Well, all the harmonics shoot up And this one here Is now minus eight db So we've gone from minus 33 to minus eight. So that's 25 db a difference that's a significant difference So you can see obviously that our pfc is doing its job if I release this blue button all of the harmonics will reduce And we're going over to update there we go And this harmonic the third harmonic has reduced to minus 34 33 db there So a difference of 25 db. So a significant difference there good, so our so our pfc appears to be working reducing the harmonics You could then compare these against the standard 61 000-3-2 Depending on which class device you're using and check that you pass the limits I've I've tested this with the power analyzer. So I know this passes very well But you can also use your scopes fft function to do that for you good, okay, so Let's now just take a look at our Switching frequency. So I'll disable the fft I'll bring in the time base so we have our This is obviously at 5 milliseconds per division. So you see our 100 hertz rectified input voltage or 50 hertz input voltage And 50 hertz current there But obviously our our switching frequency is much higher than this. We're switching at 200 kilohertz So what we can do is just move some probes So I'm going to just remove the input voltage And connect The switch current probe and you can see the switch current is Sinus hurdle. That's good. That's what we want. Um, and then I'm going to move the Scaled input voltage to the pwm and change the trigger Now if I just go to something close and so find my seconds per division Obviously 200 kilohertz is our switching frequency. So you can see that our pwm Is changing sinusoidally as you'd expect to give us that sinusoidal input current So I'm just going to use a single trigger And there we go. We see the pwm at 200 kilohertz because we're five max seconds per division And the switch current you can see there a nice ramp on a step in ccm And we're taking our sample in the middle of the on time. So it's nice and clean. There's no there's no spikes there So that's good The other signal we want to look at is our voltage loop a voltage loop. We said as much is running much slower Six kilohertz. So I'm going to Run this and move the probe to The test pin v-loop so v-loop is The let me show you in the code Is the pin we set high here v-loop iosr We set that high when we enter the slow loop and then we set it low When we leave the slow loop so This is what we see um It's uh It takes takes a few married seconds to execute the slow loop because there's several two voltage zero controllers in there There's lots of conditional if statements checking under voltage over voltage, etc But we don't particularly care because it only Occurs once every six microseconds. So once every six kilohertz Um, but let's just check the frequency make sure we're running At six kilohertz. We use our curses here and we bring this across and Yep, we are running at six kilohertz. That's good And one thing to note is that the duration of our slow loop isr changes So it's you can see the training edge here moving And that's because the slow loop isr is a lower priority than the fast loop is always set that up in qmx Um, and that means that the slow loop will be interrupted several times many times in fact during its execution cycle And the microcontroller would jump from the slow loop lower priority into the fast loop to control the current And then when the current loop isr has finished execution It will return back into the slow loop to finish doing what it was doing So that means that the execution time will vary plus or minus some amount But again, that's fine because we still are executing our slow loop every six kilohertz Good so as you can see here we have a nice running pfc Um We are have a good power factor Um Power factor of one we have low harmonics. Uh, the voltage is well regulated uh using the voltage loop And effectively we have a very well designed pfc. We don't have time to measure the uh the control loops There are some other of our videos on youtube about measuring the voltage loop current loop There's a few uh interesting points you have to take note of when you measure the voltage loop and current loop for a pfc So please feel free to take a look at those videos Um As you can appreciate there's a lot of information around digital pfc. We've only shown you uh an introduction and we spend Days three days in our workshop going through all of this information and showing you how to design digital pfc So if you get the chance, uh, please do come along to our workshops when we run them again hopefully next year And we'll go through this in much much more detail All that reminds me to say is thank you very much for watching We hope to see you at one of our workshops in the future Please visit our website to find more of these resources available for you to download And don't forget to like and subscribe to our youtube channel. Thank you very much and see you again soon. Thank you


Who's not really on top who got they don't shop the hustle don't stop the same oh shit Say check it check it check it man. It's your boy e ceo man. I'm here with the lovely official mr. Mako What's going on? No, no, you know my dad walk on man. Hey man. We got a guy here special guys He don't need no introduction man the chat is in the building and he ain't playing no game But I take everything over by storm. Yes, sir. Man. Thank you for coming on the show man Man, you know, uh, man, I'm down here in H-town man. I called a man.   I already know you got a player Yes, sir. You see I like to get to know about a man Not the artist, but a man. Yes, man. Okay, so born and raised here in Texas Yeah We came we came that back way to go to Houston. It was a wooden it was wood Street that goes straight College It's a fan Okay, what school did you go to? I want the love can high school. Okay? I ain't go to college. Okay. Did you like it? It was high school school. How how are you when you left love can? Mm-hmm 21 You left sort of late 20s.  No, I'm saying like that's what I love Because it was it was think about it.  Oh, let's talk about it feeling like Just yeah, did you have any other feelings before that? Mm-hmm. That's the first time at the only time I Was young like you know, I just I can't That's it and you're how I was I was 17 17 Well, I was 16 when I first got my first shot. That was a negative fortune. How much time did you get I? Got three years Three years serve the whole three years. I did two and a half two and a half What was that? What was that like going to what prison for the first time to What about it? Like what was the first thing? You know, I have one thing I've known like anybody that I've known that went They always said like because they have this notion of how it's supposed to be Yeah, so whenever they're getting ready to go they psyching themselves up saying all such stuff that you know I gotta get big and buzz. I gotta be able to fight. I gotta this I gotta that What was your notion before you went in and then when you went in? How different it was from what you thought it was gonna be like when I went in I thought it was gonna be like People on the street.  I like that. So the prison I went to I went to Bradshaw. Yeah, it's not like that Yeah, you know, I'm saying it's a TD side stay just I I was on the state jail side at first cuz the charge I had there for fire home it ran concurrent with the charge that I had TDC time for okay, so I did have them I did most of my time on Okay, so when I when it was time for me to go to TDC I had to go to college station for the open cave pistol I mean marijuana case I had out there. I had a song for that time. I had to come back to Bradshaw, but when I was going back now, I'm on the TDC side. So I gotta do redo everything I got shame ahead again.  They put me in white now I wasn't in like the federal team. I wasn't khaki. Then I switched over to the all-white. I stayed I went to When you going back through the process, you're gonna go to a five different units. So I went to Gurney bird Damn gurney bird holiday in Huntsville and Beto and It's another it's another prison I went to but it all put me back at Bradshaw On the state jail side because I may parole when they see me to the TDC side I was overdue release because of my state jail time my back time but okay, so in prison Tell me about something that happened that Really wild you tell me about a prison story because we have a prison confession section to our stories something that somebody can learn from something that you know happened like well and You overcame it. Oh, see you already know I saw that smile now one day one day with it like the it's the country so like isn't Is is it's like segregated kind of they got the and brotherhood the woods That's a Caucasian side. You know I'm saying they got the Hispanic the image 13 tongue-o-blast the blacks You know I'm saying blood crew G. Right or whatever.  This is serious problem like that remind me of what you said about When we're talking about gangs and saying that you know how some people feel like because you know gang when everything Pop off like what you're talking about you supposed to stay together as that gang blood is supposed to stay together Crystal stay together But in reality it's about a color of your skin no matter what Whatever you are no matter what no matter what so when it popped up like it was a wake-up call We're like I need people shouldn't gas through the vent. They don't know beam back No, I'm just what we are like damn in prison. All right. Yeah. Yeah, you see the city I can't talk to my family. I can't get no contact. You know come and sit. I'm on the streets I can't Say I got a baloney apples and that's it and in the morning. I get a peanut butter jelly sandwich. Yeah in the milk That's it. That was the worst Horrible that was the worst time and then when I got sipped off to the TTC side. I Was it said the whole time? Cuz I'm going through these different units. You had to go through intake process and all it so you start off And when you go to prison you gonna start off in case Before they since it seems to the doom Because they gotta do your blood work. They gotta get to know you and do all this stuff They gotta see what how they gone that tank is smaller, right? Yeah, this thing. Yeah. All right, so 24 Yeah, it's 24, but it was like in this in Bradshaw. It was cages Okay, it was it was it was a door. Yeah, but it was case So boom boom boom three cages a day room once out one TV That was in the intake part when you get to the actual dawn it's 64 minutes. Hey, yeah, then it's based out but before that You and you just in a you sleeping with them strangers in the cage Yeah, yeah, yeah, yeah, so much you get to know everybody Well, how was it when you first went in there when you you didn't know the day was gonna make you eat fast, man You know, I mean like it's five minutes and you have to get up I thought and then just How was the road we got to go go go like What if the woman prisons are the same and yes, yeah, it is no it's no different You didn't know that at first they were gonna do that. I seen it, but I was like she was so crazy I'm thinking that when I'm getting there when I'm going I'm thinking like damn when I get home from a stove I heard it comes here good Like man, you gotta wait 30 days for you. Can you make stone? I'm like, what? What so I gotta eat I am forced to eat cafeteria. Yeah, I'm child food. Yeah, I want me to tell you that it's terrible Man, it's terrible That's Peanut, but that's about it. That's it soon as you walk through it soon and Brad saw it was so bad But like the rats were so bad soon as you walk in the cab it's a apple you see food in the corner Rats got a hold to it like so Like I ain't gonna lie after I made store when it was time to be able to go to store.   So did you lay it down while you'd have to work? You had a infirmary a pass or something. No, I Had an infirmary past my leg was messed up in sick of sale.  Oh squad be a squad. Yeah, I'm not. Yeah. That's a terrible feeling, but he's sitting there all day just chill Chilling, so I don't remember did I ask you I didn't ask you if you were raised with your mom and dad in the same house Oh, I was raised by my mom on my mom's only child on my dad's side I have two brothers Now I had three brothers in three suits So Yeah, my dad wasn't in the house with you as a kid. No, he was in prison. Really? Yeah, my dad was in prison until you were how old 1000 I was in 6th grade then he went back to I was in 9th grade so So you wasn't able to build a relationship with him, but I had my uncle's Yes, I have my mom my mom's brothers So so you didn't feel like you needed for Father love. I mean now that I got not I got kids I know I have no father in the house. Oh, right. I made it is but back then I wouldn't have affected like Yeah, but as we get older you look back you realize that this is the reason as much as you think it didn't affect you This is the reason why I acted this way. Yeah, if he was here, I knew I wouldn't did I wouldn't went to prison I wouldn't got in trouble in school. It's just being from school to 10 cent. I just is alternative school You were just acting out that whole time. It wouldn't even that I was acting up.  I was a class clown Yeah, I was a class clown for sure like and it's the hardest ever bad bad class clown and like Played basketball, but I Played silly a you I could never play for the school cuz I was I was in trouble Damn, I wouldn't pass it. So when did you figure out that you want to do music with all of this? That's going on. I was eight years old.  I was I was spoiled. We had our time We went through situations where we were struggling, but I was spoiled like up and down We had everybody and you were still bad. Yeah, but my mom She had a computer my mom worked at Kmart My whole childhood life like when I was until I got in high school But she wait that came up for they start closing them down. So she had a computer in her room And I just she was very into me like let me play computer games She bought me computer games. I kind of still let me play on the computer This one it was the AOL dial up in the internet, you know the internet had to dial up for you to be on the internet but I ended up like I seen people around and Love can like doing music. So I Just wanted I just tried and when I tried I feel in love with it like making my first song like you feel How old were you when you made your first major like you started taking it seriously and you made your first Major song and everybody heard it when I was eight That's when you made your mate your first major. What major song was that I ate my space It was on my space in love game. It was for major cuz I was so young like I Was I was a part I was always a popular kid No, I'm saying so because of my dad like family and my brothers on my my brother on my dad's side My friends and stuff like that. So I was always popular. So I think the song was kind of No, nobody's just laughs. Hmm. Okay Yeah, I just lay out. Yeah, so Because the car like Houston, no many places the slab situation. So So after eight as you say you took it serious then after eight When did people start noticing and trying to come to you to help you advance or help you get better? Mmm, I say but after eight People's eight.  Seriously Hmm most eight-year-old kids are not trying to figure that out. I had on my mom Look, it's my first out because My mom still got that's the back of it. This is what you at eight. That's your picture. That's me Let me see that Good to know the young nigga on it. That's what he made For himself when he was eight. How did you figure out how to do that? I don't know Like I just like I'm very smart when it comes to electronic computers I let like I seen people doing it like I seen people making album covers and I just Like looked it up on the internet and found out like a photo editing app and I start putting my own words on it Stuff like that.  You didn't get nobody to hold it do nobody has to do nothing And I said me myself and how are you on Windows Media? I was when I shot my first video I was nine ten Mm-hmm, seriously, he's still on there 13 years ago and you uploaded this 13 years ago on YouTube It's not you did this video. Yes, ma'am. That's though. Yes, ma'am You can tell babe I was a child. I was a baby. Baby. That's guys. Oh that nigga going in. That's what they don't want to hear right there One day, that's what I love that. I love that video 13 years ago.  I promise you but I'll be more comfortable like how did you do this?  When did your mom switch it up though?  I'm basketball. Oh, yeah, I was still playing. Hey you I was rapping Yeah, but you was giving trouble at school you was getting so she's seen that she She I think she just instilled and started into her mind.  She started by we win radio check. We start ending up at the She buying microphone stand she buying pop screen. She buying computer.  We got to the point where everybody started coming to our house to record. Oh Yeah, I started my charge Nah, cuz I started my own label my own label was caught all starting to tame and how are you at this point? I gotta keep asking cuz I was I was in I was in sixth grade. So when I started my own label My mom started knowing the traffic at our house and she just she she just gave into it like She was very big on like When she was there wait, don't know. I don't have nobody in the house. That's how you come on me You should be gone. She was big on that.  You know most some family, but they steal a steal But we don't say they didn't do it. Yeah, we only you'll know which ones told it. That's how cold it is I was 13 when I had my first LLC That's hard. Your mama went and did it for you. She helped me. I figured it out myself, but She helped me. She paid for it Wow I'll start entertainment. Hey, is he you still on it? I Now, um I'm switching it up right now. I still got you and you got artists still signed on to you. Yeah My my day one partners my best friends They still with him. Wow. So explain to me. I see you with drake on there on the picture How did you even end up knowing who drake? Well far as linking up with him? I know you know who he is, of course, but just just How do y'all end up linking like um Oh the situation how long ago was that that was It's not happening. It's not happening in the future. I've been I've been drunk. Okay. I mean the first time you met him though the first time I ever met him was um First time I ever met him. It was his birthday in california.   You have dress up for this party So it will last minute. So I'm screaming around trying to find a suit. I finally find a suit You know what I'm saying? I get situated or whatever we fly. I was on parole. I wouldn't even possibly the state So I go out there and the crazy part about it is when I got there Every everybody flying I missed my flight my flight somehow my flight y'all delayed I was on a different flight because everybody booked a plane ticket before me So I was on a different flight when I got there The party was so packed the fire moisture came and shut it down So I was on the outside of the gate Me and my partner swim We was on the outside of the gate while everybody was in the inside So I never got to go in that party that party right there. I didn't get to go in I went in that after party Oh, okay You know what I'm saying after everybody went and changed clothes Let's hear this new spot. And I got and I finally got to meet jake and it was just like I ain't I ain't like after being around meeting so many superstars and whatnot I didn't want I noticed that it was real big on don't be on no No, no, no fan.  So I went on no pulling no camera out It was just a Shake a leg and it was some A situation and the opportunity to embrace it. Yeah, but the one that we saw online you took a picture So when was that one? Was that one in the first time or the second time? That was his birthday That was another time. Okay. So, yeah and in that part and that that right there At that event they play my music. We got to talk get to know each other. What he said about your music He loved my music One thing I always ask everybody because I feel like when you are around people who Are at a higher level whether career wise or age wise always say Try to grasp as much as you can grasp from that person See what soak up the knowledge soak up. So anything that they're trying to give you soak it up What have you learned from jake? Consistency Don't give up. You know, I'm saying Stay stay stay try to stay affecting You know, I'm saying like people people do get to the point where they get cocky and feel like they name Socialify But then I got to the point. I started noticing like damn. It's a new rapper every minute I guess they got to say cheese. They got Ali different You know, I'm saying these people posing them like people getting his this rap. It's getting like it's expansion of it Everybody's starting to rap now. So now like me Me and dragon. Yeah, that's cool. But me and His his his manager bodyguard Tubbs. We got the strong relationship about the whole situation So me and Tubbs got a strong relationship Me and TV Gucci got a strong relationship That's his cousin. So going back to okay eight nine coming up Um, you started your mama see that you're not gonna give up You're gonna keep pushing towards being a rapper because that's what you want to do You got older now. You got in trouble. He said 1890 you got in trouble went to prison When how old so were you writing music in prison? I had when I came home. I had I had 324 songs and how long were you gone for two and a half years two and a half years 324 so that I never recorded.  You know what I'm saying? So I was like like right now I ain't wrote a song since I've been in prison Really on right music no more you punch in punch in And I didn't became so like all it is hard at it, but like I I know if I write It's gonna go over people here. I don't want to be sometimes be too powerful to you think too much You can think too hard nowadays like and you can be too powerful for people to eat days because people don't want to think These days like they ain't trying to find the message in music no more. No, it's about Catching how catch it is and exactly. You know what I'm saying?  It was a week when I got out got out of prison because I got on facebook and instagram freestyle So and that got you a lot of views. Yeah, so who first reached out to you? um the first people it was uh, um The the situation that I was in before I got this when the shot is united situation um rap a lot Mm-hmm Atlantic records They all reached out. Yeah, okay Sure. What made you um, what made you pick? Generosity generosity Jean Oh, that's why Jean Jean went to a Brother and used to come all the way to left gonna give me I was fresh. I didn't have a quiet It wasn't like I was just trying to get back in the streets and get some fast money and get a car And others weren't willing to do that.  And what's the biggest song that you did? For them during that time. Yeah. What's so crazy? It wasn't a it wasn't a record label at first It was a clothing brand And I never signed we ain't never signed no paperwork for me to be their audience Really? Seriously So you just stayed there because Generosity See everybody became family So it went in the box like and after you they decided to become a label or they still not living. Yeah, okay Like when they when we started seeing the music how the music was doing then it became a label You know I'm saying first it was just shot as United clothing Then it became shot as United music group then I know I'm saying so I just I just like See in 2022, I saw my first record deal ever like on paper Yeah, wow, and now what year did you get out? I'm just trying to see how I know 2019. Okay So see but see but before that I went never coming to Houston as When I like and it would be that deal Uh, the recent deal.  Yeah, I have like the person that's over at OG Nick. We had we got a strong like like strong blood like also generosity So but before like he had already they had already had a label Like right now his label it just became your old You know I'm saying so they had already had he had already started the label and He had three artists already So I'm watching like how he treating them how they doing He buying jewelry and watching like how he support them the people like how people The the attraction that getting like how people come into them and you know what I'm saying So I watched everything before I even I was in the background and everything watching everything play out before I even signed I was feeling around but I wouldn't sign You know what I'm saying? And then one day we was like, yeah, bro. We might well make this official like going ahead and Let's go ahead and do that. We did it. So you went ahead and did it and um, was the deal very lucrative? Biggest deal in the history of Texas Why you feel like it's the biggest deal in the Advance wise for so advance wise for so and how do you know that do you know all these people's offers? How do you know everybody's offers? I ain't gonna say I know everybody offers, but like this came from Head up people like saying like man sign big deal You know what I'm saying?   I don't know what they didn't got but like what people say So for our viewers to know what you're talking about Around I don't know if you want to give the exact amount or you want to just give me a rock about They put a they put a big post on the on the on the lines. Oh, it's out there. Yeah.  It's big Congratulations Advance though. Congratulations. Yes, ma'am. Thank Thank you. And how long you you have to stay there with him with with them? Five hours, but I'm gonna be there longer than that because you love it I don't be that long isn't it? That's probably be some That probably be some UGK type of I'm sure and in your entire career till today in your opinion Which song that you have that you would say it's your biggest? Locked in Locked in white Right now they said like 304 I did like a hundred thousand views and like some like a like a month And this is not fresh out. It was 2019. I was fresh out So I just we just pulled up in this little shot of video. It took off Wow, that's crazy, man. So it draw a lot of attention. I feel like like and then what's so crazy about it I drop Plus I need the other job to mix tapes. It got a lot of attention No, I'm saying but I slowed down on dropping music But who who came to you like like I see you I see you with uh With uh, James prince jr In the car like that. That's the first thing power up when you when you see how did you and him end up even knowing each other I knew jr. Before that. I'm smooth.  He's rap like him and nata What you know what i'm saying? They ran the music label for shot is united And they rap a lot. So that's how you end up. It's like a branch and rap a lot of shots united in You know what i'm saying? So I gotta ask you this man because I've asked everybody this till I'm down here in Houston, Texas when where would you at when uh, uh takeoff uh was uh Was basically killed I was at home. He was at home. What did you think when you first heard about that? Dang, that's a legend, brother It's a legend. It's huge man. R.I.P. takeoff.  Don't know none of them out. We wasn't there We don't know what went on but Just being in houston and the way you move how is that affected or changed the way you think about how you move in the streets it just Because of you gotta realize how people looking at this anything can happen, bro at any time anytime so when you look at Being because there are so many different things on the internet. We don't know what's true But we do know what's being said. Um when you look at what they're saying and then your affiliations with Like uh, say junior and all this different stuff that wraps around it. Well, how does that affect you mentally? It it it don't cuz like it ain't anything can happen So yeah, I'm not in the room to even speak on like I wasn't in the room. So I don't know what's going on I don't like if I'm not in the room and we need to my own two eyes. I don't believe you don't know what Yeah, because like I said, we don't know what the situation was but we do know that um They they were down here. Um hanging out or whatnot, but um I just think that it was a very unfortunate situation, but I do know that um That it's something to where We have to find a way to mend a heck of a gap You know, I mean between Different situations that's not taking place. You know, we definitely want to try to figure out a way to show love Through this situation. No, so we love Migos. Mm-hmm. We love Jane Prince junior. Yeah, we love P we love all these people. Yeah We got to find a way to make show That we figure out a way To build the bridge and not a wall. Yeah, you follow me.   That's right. You know what I'm saying? So the internet The and who's to say we don't even know what's going on on west was really going on was really going down We like I say we went in the room You know, I'm saying the internet can make a situation million times worse, bro With that being said, um Do you still have a relationship with junior or any of those guys over there? My love still my love don't never change for a person. Somebody got that's family I look at him like, you know, I look at him like family like a person got to do something to me Yeah, for me to me. Yeah, and I ain't saying that in the selfish way But like somebody got to do something. Yeah to me for me to look at them as okay My feelings to change toward them. Do you think that they seem because when finesse came home, they they really really ramped him Uh As a brand brought him in and he had just came home Was that the same type feel like when you came home? Was it someday where you linked with them or? Or it took time for them to even notice you It took time Because i'm not from houston and But he's not even he's from emphasis. It takes time to build on a person though Like but he had a rep too before he left finesse been signing junior Even before he went to prison. No, but during prison. Oh during prison. Yeah, so That that that situation. Oh It's just new to the world People on the outside. You know what i'm saying? Yeah, he been We already knew this was gonna happen. I've been new it was gonna happen since I first came down 2019 2020. I've been new Wow, I already knew it just happened out here. Wow I'm sorry um Like the people i'm sorry too. They don't don't mean the people Where's that company? Where are they from here? UBK? But I I didn't mean to say UBK, but The people the side of the united situation When they didn't them they already they used to talk to finesse and like Chop it up when white was in jail. So I already knew that situation. I already knew the whole finesse two time situation Yeah, no, I get it.  What's next? Turn up like Turn turn everything up, man But me I want to turn When I go to a situation I'm trying to turn that situation up I'm trying to make everybody like I'm trying to turn the whole movement up When you first got your advance to 350,000, what did you do? What was the first thing you bought? First thing I bought with three I gave money to my family like no stuff for my family stuff for my kids You know, I'm saying different stuff like that Builds all kind of stuff.  I got so many plans, but it's crazy. That's hard. That's hard. That's how I've been worried about Taking my shoulder family shape making sure the family good.  That's the kind of that's the kind of album on like I want My last top three artists of all time did a lot Number one any genre Top three artists of all time did or live number one Your number one your top three my top three number one any John Drake Drake number one.  Okay, and number three number three. I found a one Myself hey, and that's what I'll be thinking too. Like I'll be like is he gonna they gonna put theyself in this Some people do I really want to put myself number one. Hey, I really do list. Hey, so do you um, okay Okay, how do people get a hold of you if they looking to try to holler at you? Instagram Instagram at official little chat uh Facebook tag um YouTube little chat And little chat on all music platform. That's all who the hardest Texas artists that you Nigga from Texas that you that you can think outside of yourself In Texas knew it up and coming I asked G is so fat that he said you In Texas. Mm-hmm period. He just told me you was you was hard. Oh for sure. I gotta go fat Oh, yeah, yeah I believe in fat, bro. You believe it. How did y'all build a bun? I see y'all got songs together We got bun together. How did you how did you feel? How'd you build that bun? Just being there for one another rapper live studio Really everywhere started that Yeah, everywhere started that I mean fat fat was up there recording. He had a session. I had a session Him and nor was up there and um No pulled up in a big red truck. I never meant no I've never seen over for my man.  They jump out and we meet and greet. We chop it up. That was up there with chris baking Etco. Okay, so I knew etco. They knew etco. So we He he that's that's who linked us in together. So I got to know fat, you know, I'm saying the um that night Shit, we turned the studio session into the same session. We did four songs that night And we did the video like two weeks later Wow, but ever since then Me and fat we Wouldn't been everywhere together, bro Wow, I think that's hard brotherhood, man. No, I was so together like that No, man, I just want to tell you man.  I'm watching you now, man You know, I'm saying you family now for so I don't know what else you had going on.  God love you and you can always turn to god when you ain't got no Father here on earth to be there for you in prison or whatever you always got god for sure And I gotta say that you know what I'm saying That's the most important thing out of everything that I done said since I've been sending this seat That's real, man. No for real You all you all you gotta do is just focus you're very special God has given you opportunity that a lot of people would never ever get Young niggas all over you know how many niggas in my inbox right now trying to wrap and trying to get somebody to see them That's just so hard, bro. That's it hard to do but you've done it And you stay consistent And god has blessed you All I say is pay it forward, man Let some little kids see that they can make it as well. No for sure for real right now like I'm trying to build it up like love can we ain't just be gone. Yeah having too much You know I'm saying like right now I'm trying to take stuff that way you know build stuff out there Try to get the kids in motion sports all that. Yeah sports had kind of died down out there.  Nobody everybody ain't got that No, everybody don't have that everybody don't Can't go back and pull that up and say man This was me at when I was eight or when I was seven or when I was five and I was passionate about it They'd say that the proof is in the pudding I just gotta commend you For holding it down all this time and you deserve everything that god have for you Yes, sir. Everything. I appreciate that man. We love you, sir I love man. And if you ever need anything I'm just a phone call away And if you want to pull up or if you need me Tell me what's going on. I'm gonna support you. Yes, sir I mean just let me know man. Like I said, man. I'm It's a lot of people I show love to a lot of people show love to me Welcome to the family home now for sure. You know what I'm saying? Yes, sir Man check it man. Did we get everything? Yeah Because guess what this ain't the last time you coming you coming to Dallas to my spot I'll be there. I just told patty coming in a couple of weeks. You should come with him. I'm be there You're gonna come with him. I'll be gonna do we're gonna run it back. Let's do it check it man Hey, man, it's been another great segment of boss talk on the one where the bosses talk and we out. Yes, sir