{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 5: Inverters" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.12_1: EX5_12_1.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 5.12.1: rms output voltage,output power, average and peak currents,peak reverse blocking voltage,THD,DF,harmonic factor and distortion factor of the lowest order harmonic\n", "clc;\n", "clear;\n", "close;\n", "disp('part (a)')\n", "format('v',5)\n", "v=24;//in volts\n", "V=v;//\n", "r=3;//in ohms\n", "v1rms=(2*v)/(sqrt(2)*%pi);//in volts\n", "disp(v1rms,'rms output voltage at fundamental frequency in volts is')\n", "disp('part (b)')\n", "po=((v/2)^2)/r;//in watts\n", "disp(po,'output power in Watt is')\n", "disp('part (c)')\n", "itav=(v/(4*r));//in amperes\n", "itp=((v/2)/r);//in amperes\n", "disp(itav,'average transistor current in amperes is')\n", "disp(itp,'transistor peak current in amperes is')\n", "disp('part (d)')\n", "vbr=2*(v/2);//in volts\n", "disp(vbr,'peak reverse bloacking voltage in volts is')\n", "disp('part (e)')\n", "vo=v/2;//\n", "THD1=((vo)^2-(v1rms)^2)^(1/2);//in volts\n", "THD=THD1/v1rms;//\n", "disp(THD*100,'Total Hramonic distortion in percentage is')\n", "disp('part (f)')\n", "n=[0;0;(1/3);0;(1/5);0;(1/7);0;(1/9);0;(1/11);0;(1/13)];//\n", "for i=[3;5;7;9;11;13]\n", " v(i)=(2*V)*((n(i)))/(%pi*sqrt(2));//\n", "end\n", "x=sqrt((((v(3))/(3^2))^2)+(((v(5))/(5^2))^2)+(((v(7))/(7^2))^2)+(((v(9))/(9^2))^2)+(((v(11))/(11^2))^2)+(((v(13))/(13^2))^2));//\n", "DF=x/v1rms;//\n", "disp(DF*100,'distortion factor in percentage is')\n", "//distortion factor is calculated wrong in the textbook\n", "disp('part (g)')\n", "HF3=v(3)/v1rms;//\n", "DF3=((v(3))/(3^2))/v1rms\n", "disp(HF3*100,'HF for the third harmonic in percentage is')\n", "disp(DF3*100,'DF the third harmonic in percentage is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.12_2: EX5_12_2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 5.12.2: rms output voltage,output power,average and peak currents,peak reverse blocking voltage,THD,DF,harmonic factor and distortion factor of the lowest order harmonic\n", "clc;\n", "clear;\n", "close;\n", "format('v',5)\n", "v=48;//in volts\n", "V=v;//\n", "r=2.4;//in ohms\n", "v1rms=(4*v)/(sqrt(2)*%pi);//in volts\n", "disp('part (a)')\n", "disp(v1rms,'rms output voltage at fundamental frequency in volts is')\n", "disp('part (b)')\n", "po=((v)^2)/r;//in watts\n", "disp(po,'output power in Watt is')\n", "disp('part (c)')\n", "itav=(v/(r));//in amperes\n", "itp=((v/2)/r);//in amperes\n", "disp(itp,'average transistor current in amperes is')\n", "disp(itav,'transistor peak current in amperes is')\n", "disp('part (d)')\n", "vbr=2*(v/2);//in volts\n", "disp(vbr,'peak reverse bloacking voltage in volts is')\n", "disp('part (e)')\n", "vo=v;//\n", "THD1=((vo)^2-(v1rms)^2)^(1/2);//in volts\n", "THD=THD1/v1rms;//\n", "disp(THD*100,'Total Hramonic distortion in percentage is')\n", "disp('part (f)')\n", "n=[0;0;(1/3);0;(1/5);0;(1/7);0;(1/9);0;(1/11);0;(1/13)];//\n", "for i=[3;5;7;9;11;13]\n", " v(i)=(2*V)*((n(i)))/(%pi*sqrt(2));//\n", "end\n", "x=sqrt((((v(3))/(3^2))^2)+(((v(5))/(5^2))^2)+(((v(7))/(7^2))^2)+(((v(9))/(9^2))^2)+(((v(11))/(11^2))^2)+(((v(13))/(13^2))^2));//\n", "vorms=0.9\n", "DF=x/vorms;//\n", "disp(DF*100,'distor factor in percentage is')\n", "//distortion factor is calculated wrong in the textbook\n", "disp('part (g)')\n", "HF3=2*v(3)/v1rms;//\n", "DF3=2*((v(3))/(3^2))/v1rms\n", "disp(HF3*100,'HF for the third harmonic in percentage is')\n", "disp(DF3*100,'DF the third harmonic in percentage is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.12_3: amplitude_of_the_first_three_lower_order_harmonics.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 5.12.3: amplitude of the first three lower order harmonis\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "v=200;//in volts\n", "n=[(1/3);(1/5);(1/7)];//\n", "for i=1:3\n", " vn(i)=((4*v*n(i))/(sqrt(2)*%pi));//\n", "end\n", "disp(round(vn(1)),'Rms value of third harmonic component of output voltage in volts is')\n", "disp(round(vn(2)),'Rms value of fifth harmonic component of output voltage in volts is')\n", "disp((vn(3)),'Rms value of seventh harmonic component of output voltage in volts is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.12_4: compare_performance.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 5.12.4: amplitude of the first three lower order harmonis\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "v=200;//in volts\n", "n=[(1/3);(1/5);(1/7)];//\n", "vo1rms=(2*v)/(sqrt(2)*%pi);//in volts\n", "for i=1:3\n", " vn(i)=((2*v*n(i))/(sqrt(2)*%pi));//\n", "end\n", "disp(round(vo1rms),'Vo1rms for half bridge circuit in volts is')\n", "disp(round(vn(1)),'Rms value of third harmonic component for half bridge circuit in volts is')\n", "disp(round(vn(2)),'Rms value of fifth harmonic component for half bridge circuit in volts is')\n", "disp((vn(3)),'Rms value of seventh harmonic component for half bridge circuite in volts is')\n", "disp('for bridge inverter')\n", "vo1rms1=(4*v)/(sqrt(2)*%pi);//in volts\n", "for i=1:3\n", " vn1(i)=((4*v*n(i))/(sqrt(2)*%pi));//\n", "end\n", "disp(round(vo1rms1),'Vo1rms for half bridge circuit in volts is')\n", "disp(round(vn1(1)),'Rms value of third harmonic component for bridge inverter circuit in volts is')\n", "disp(round(vn1(2)),'Rms value of fifth harmonic component for half bridge inverter circuit in volts is')\n", "disp((vn1(3)),'Rms value of seventh harmonic component for half bridge inverter circuite in volts is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.3_1: frequency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 5.3.1: Maximum frequency\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "T_off=100;// in micro-sec\n", "L=40;// in micro-H\n", "C=5;// in micro-farad\n", "R=4;//in ohm\n", "Tr=((2*%pi)/sqrt((1/(C*10^-6*L*10^-6))-(R^2/(4*(L*10^-6)^2))))*10^6;\n", "f=(1/(Tr+T_off))*10^3;\n", "disp(f,'maximum frequency,f(kHz) = ')" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }