Note : If you are using a variable step size in simulink, then add a zero order hold before each input of sim coupler and insert the sample time same as of PSIM. If you are using fixed step size in simulink then
A symmetric PWM has symmetric waveform when referred from its center. However an asymmetric PWM is the one with no symmetry in the waveform when measured from the center as shown in figure below. In Figure below the Ts represents the switching cycle. In Symmetric PWM the harmonics are low compared with the asymmetric.
Click to zoom |
For worldwide viewers
For viewers in Pakistan
For worldwide viewers
For viewers in Pakistan
For viewers in Pakistan
To download latex please refer to downloads page.
For worldwide viewers
For viewers in Pakistan
The matlab code for plotting multiple figures in one main boxed frame is given below. Consider that we want to plot 9 graphs in one figure similar to figure 1 below. This blog post will be updated when required.
Figure 1: M x N matrix |
figure ;
subplot(3,3,1) % makes a three into three metrix and place the graph in position 1
plot (xxx)
hold on
plot (uuuu,'red')
plot (yyyy)
subplot(3,3,2) % put the result in place 2
plot (XXXXX)
hold on
plot (XXXXa,'red')
plot (XXXXX,'green')
subplot(3,3,3)
subplot(3,3,4)
and so on
subplot (3,3,[8,9]) Plot the graph on two boxes i.e 8 and 9
Permanent magnet motors | Construction, theory and classification
Stepper motor | Construction, theory and classification
Stepper motor control IC
Often wonder why PCB are used in electronic devices instead of verobaord like stuff we used to do in our college laboratories ? Well the reason is simple, PCB offer reliability and ease in fabricating a circuit. Although the process seems tedious if we compare it with traditional breadboard or veroboard method, but it removes all the clutter of wires and brings neatness in the work that ultimately results in a much more reliable circuit with less probability of failure. In this blog post i will explain all the detail starting from circuit designing on paper up to the fabricated PCB on FR4 substrate. For this i will be using diptrace PCB software, of which the free version is available on their website.
Circuit diagram: Figure 1 shows the basic diagram of a hall effect current sensor system. I have selected this diagram because the package type and information is not standard for this sensor. Therefore, datasheet information about its dimensions are required for its PCB footprint. Secondly, this circuit also utilizes a positive 5 V regulator that comes in the TO-220 package. This package is widely used in most of the common power electronic switches like 6N60, IRFB4229, Z44N etc. Furthermore, this circuit needs input and output connectors which in my case will be similar to what is shown in Figure 2. Hence it is a very comprehensive example for learning PCB design.
For viewers in Pakistan
Circuit diagram: Figure 1 shows the basic diagram of a hall effect current sensor system. I have selected this diagram because the package type and information is not standard for this sensor. Therefore, datasheet information about its dimensions are required for its PCB footprint. Secondly, this circuit also utilizes a positive 5 V regulator that comes in the TO-220 package. This package is widely used in most of the common power electronic switches like 6N60, IRFB4229, Z44N etc. Furthermore, this circuit needs input and output connectors which in my case will be similar to what is shown in Figure 2. Hence it is a very comprehensive example for learning PCB design.
For viewers in Pakistan
The next step is the fabrication of a PCB. The fabrication process is completed using the indigenous chemical etching using ferrous chloride method. The process is well elaborated in the below mentioned video.
The final prototype is ready as shown below.
Back side of the PCB (click to zoom) |
Similar PCB fully operational (click to zoom) |
In power electronics gate driver ic are required to compensate the junction capacitance of power electronic switches. Usually high current capability ic are required. In this blog post the gate driver ic are classified in terms of their driving current,
This document is prepared by Azad Ghaffari and is taken from his website. The intention of uploading this document is for my personal archive. Kindly cite the document accordingly.
I burnt almost dozen mosfet while trying to test the switching of secondary mosfet of my flyback inverter. It was in fact something trivial because i thought to switch one mosfet at a time to get a half wave waveform at a time. I discussed it with my supervisor and he pointed me towards the solution. "Operate both the secondary mosfet instead of one at a time" he said. "Because when you operate only one switch there comes a problem, that is during its turn off time there is no alternate path for the energy stored. Therefore, high voltage spikes emerge that are resulting in the failure of mosfet" he added.
I operated both the switches simultaneously, such that for positive half cycle Sac1 i turned on and for negative half cycle Sac2 is turned on. The experiment of getting one half cycle only by trying to switch the Sac1 alone should be avoided.
Flyback inverter (Click to zoom) |
PS9505 is an optocoupler with the capability to produce large output current up to 2.5 A. It can be used to replace a traditional tag team of optocoupler and a gate driver. Its salient features are as follows.
Rg = Vg/Ig
where Vg is the gate voltage applied and Ig is the gate current required to switch the device.
Ig= Qg/ts
where Qg is the total gate charge and ts is the switching time
Pin configuration (click to zoom) |
- VCC-VEE can be supplied up to 30 V max.
- The output follows the input hence it is non inverting.
- Max operating frequency is 50 kHz.
- Inherent under voltage lock out with VCC-VEE < (9.5 to 12.5V)
The circuit connection is as follows
- Pin 2 and 3 takes the input through a resistor normally in the range of 200-500 ohm.
- Pin 1 and 4 are not connected . They should be grounded or left open.
- Pin 8 gets the VCC while pin 5 is grounded.
- Pin 8 also needs a bypass capacitor with value greater than 0.1 uF.
- Pin 6 and 7 are shorted externally and output is connected with them with a series resistance RG.
The value of RG should be selected carefully as it has a great impact of the working of PS9505. If RG is large then it may lead to higher switching dissipation. Selecting a small RG leads to larger voltage variations. Therefore the selection of RG needs calculations as presented below.
- RG must be selected such that the ic never exceeds the maximum current rating i,e 2.5 A.
- RG must be selected so that the ic power dissipation remains bounded within 178mW
- RG will be selected based on its calculation from input a well as from the output side.
- RG value is based on the calculation from input side aand from the output side. The value calculated from the input side is designated RG and the one calculated from the output side is termed as Rg.
- Fine tuning of Rg for optimum results.
RG calculation from input side
According to the application note of PS9505 the following equation
RG > {VCC-VEE-VOLM}/ IOpeak
where
VCC = Biasing voltage
VEE = 0 if grounded
VOL = Low level output voltage
IOpeak = Peak output current i.e 2.5 A
VOL vs IOL characteristics (Click to zoom) |
In my circuit VCC= 18V, VOL is provided in the application note and is selected as 3.5 V , hence
RG > (18-0-3.5)/2.5 = 5.8 ohm
RG > (18-0-3.5)/2.5 = 5.8 ohm
RG > 5.8 ohm as calculated from the input side
RG calculation from output side
To calculate Rg from the output side first we need to ransack the datasheet of the device connected at the load. For example let us consider the mosfet IPA65R650CE . The information required from its datasheet is the total gate charge. Now comes the calculation of Rg from the output sideRg = Vg/Ig
where Vg is the gate voltage applied and Ig is the gate current required to switch the device.
Ig= Qg/ts
where Qg is the total gate charge and ts is the switching time
Now using the datasheet of the above mentioned mofet Ig= (23nC x 100kHz) = 0.0023
Therefore Rg = 18/0.0023 = 7826 ohm
According to the application note of this ic , following condition must be true .
RG calculated from input side < Rg calculated from output sideIf this is not true then you must find some other optocoupler which can drive a larger current.
Fine tuning RG
In order to tune the RG we need to find the power consumption of the device. The power consumption consists of two parts.
- Power consumption on the input side (PD) = Vf x If x duty cycle
- Power consumption on the output side (PO)= Po(circuit)+Po(switching)
In this regard Po(circuit) is the consumption of the photo detector and Po(switching) is the power consumed by the output current.
Calculation of PD= 16mA x 1.8 x 0.5 = 14.4mW
Calculation of Po(circuit)= Ic x (VCC-VEE) =
where Ic is the current supplied to the photo detector and typically it is 2mA and maximum 3 mA as provided in the application note.
Calculation of Po(switching) = Esw (RG,QG)xFsw
where Esw (RG,QG) is the per cycle power consumption when charging the mosfet and fsw is the switching frequency (60 Hz in my case). The Esw (RG,QG) can be calculated based on the graph presented in application note. Based on 5.8 ohm RG calculated above the Esw is found to be 0.5uJ.
Calculation of PO = Ic x (VCC-VEE) + Esw (RG,QG)xFsw = 3mA x(18-0) + 0.5uJ x 60 = 54 mW
This PO is less than the maximum power rating of this ic i.e 178 mW.
Switching loss per cycle ( click to zoom) |
Therefore, based on the switching loss graph presented in the application note, the RG should be between 6 ohm - 40 ohm.
For worldwide viewers
For viewers in Pakistan
Flyback inverter has primary switch connected in series with the transformer winding. A snubber circuit is required to damp the high voltage spike that occur as a result of resonance that occur because of the transformer leakage inductance and the mosfet capacitance. Without a snubber circuit the mosfet on primary side can burn out.
An RCD snubber is commonly used in flyback configurations and consist of a diode, capacitor and resistor. In this configuration ,the diode must be able to operate at the same frequency as the switching frequency. It is because the leakage inductance will create resonance during the turn off time.Therefore, if the diode in RCD snubber is not able to switch at switching frequency it will not work and hence cannot protect the mosfet. C should be greater than or equal to the thrice of the Coss of the mosfet. While R = V/I where V is the max voltage the switch can handle.
Figure 1 below shows the effect of snubber on the switching pattern of a mosfet. It is pertinent to mention that the below mentioned waveform are recorded under different input conditions.
Figure 1 below shows the effect of snubber on the switching pattern of a mosfet. It is pertinent to mention that the below mentioned waveform are recorded under different input conditions.
Without RCD snubber (Click to zoom) |
With snubber (Click to zoom) |
For worldwide viewers
For viewers in Pakistan
For viewers in Pakistan
For viewers in Pakistan
Video tutorial | Simulation of 3 phase SPWM inverter
For worldwide viewers
For viewers in Pakistan.
The flyback inverter secondary winding acts as an unfolding stage in a grid connected scnario. The switches associated with them needs gate driver circuits. The question here is that can we consider them as a half bridge circuit so that it is possible to use a half bridge driver ic with it. To answer this consider the Fig. 1 that depicts two different types of unfolding configurations. The working although is same lets consider the one with no center tapping.
During my Ph.D. work, it was a requirement to sense the dc current on the PV side and ac current on the grid side. To sense the current I used a hall effect current sensor LTS25NP. This hall effect sensor is a bit costly however, it is excellent in working and easy to setup. Figure 1 shows this sensor. This sensor has three pins on each side and three in the front side. The three pins of left and right side should be shorted together. The output is from the front side. It should be noted that there are three pins on the front side and an arrow symbol. Arrow symbol shows the flow of current, this means that the positive terminal of the wire should be wired in harmony with the arrow direction.
IR2111 is a half bridge driver that is extensively used in power electronics. It is an eight pin ic that works only with half bridge configuration. It can not be used individually for low side or high side driver. Here is the schematic that i designed during my term project.
4N26 and 4N37 are cheap optocoupler that are good for most of the power electronics applications. They are six pin ic with optical isolation. The output is inverted because the output transistor works as a switch. The frequency limit of this ic is explained in this post. The following is the working circuit of optocoupler 4N26 and 4N37.
The gate driver is essential in power electronics because of two basic reasons. First, at high frequency switching applications the switching time is less which means that in order to charge/discharge the mosfet capacitance fast, more current is required. The output current of most optocouplers is not enough to drive the mosfet properly. Secondly, most of the optocoupler output is limited to under 10 V which means that they can operate a mosfet near its threshold voltage, This results in high Rds resulting in heating the mosfet.
Recently while i was having work with mofet driver ic ICL7667 i noticed that it gets hot with the output open circuited (not connected to MOSFET). I posted my question in a linkedin group and got the following answers.
Problem : While experimenting the flyback inverter i observed a visible spark on the output of the flyback transformer.
Reason: One of the secondary winding was open possibly because of a dry solder.
Solution: Hunt for the open circuit and solder it properly.
Reason: One of the secondary winding was open possibly because of a dry solder.
Solution: Hunt for the open circuit and solder it properly.
Lecture 15 video is on simulation so it is not available here.