{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 6: Choppers" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5_1: average_load_voltage_RMS_load_voltage_Form_factor_and_Ripple_factor.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5.1:average load voltage,RMS load voltage ,Form factor and Ripple factor\n", "clc;\n", "clear;\n", "close;\n", "format('v',6)\n", "//given data \n", "f=1;//in kHz\n", "t=1/f;//in ms\n", "d=0.3;//\n", "v=200;//\n", "vch=2;//in volts\n", "vldc=(v-vch)*d;//average load voltage in volts\n", "disp('part (a)')\n", "disp(vldc,'average load voltage in volts is')\n", "disp('part (b)')\n", "vlrms=(v-vch)*sqrt(d);//RMS load voltage in volts\n", "disp(vlrms,'RMS load voltage in volts is')\n", "disp('part (c)')\n", "FF=vlrms/vldc;//\n", "disp('ripple factor is '+string(FF)+' or '+string(FF*100)+'%')\n", "disp('part (d)')\n", "rf=sqrt(FF^2-1);//\n", "disp('ripple factor is '+string(rf)+' or '+string(rf*100)+'%')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5_2: chooper_efficiency_input_resistance_and_average_load_curren.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5.2: chooper efficiency,input resistance and average load current\n", "clc;\n", "clear;\n", "close;\n", "format('v',6)\n", "//given data \n", "r=10;//in ohms\n", "f=1;//in kHz\n", "t=1/f;//in ms\n", "d=0.3;//\n", "v=200;//\n", "vch=2;//in volts\n", "Po=((v-vch)^2)*(d/r);//in watts\n", "Pi=((d*v*(v-vch))/r);//in watts\n", "cn=Po/Pi;//chopper efficiency\n", "disp('part (a)')\n", "disp('chopper efficiency is '+string(cn)+' or '+string(cn*100)+'%')\n", "disp('part (b)')\n", "R1=r/d;//\n", "disp(R1,'input resistance in ohm is')\n", "disp('part (c)')\n", "vldc=59.4;//V\n", "r=10;//ohm\n", "Ildc=vldc/r;//amp\n", "disp(Ildc,'average load current is,(A)=')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5_3: Duty_Cycle_Average_Load_voltage_and_RMS_Load_Voltage.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5.3: Duty Cycle,Average Load voltage and RMS Load Voltage\n", "clc;\n", "clear;\n", "close;\n", "format('v',6)\n", "//given data \n", "V=200;// in volts\n", "T_on=500*10^-6;\n", "f=1*10^3;// in Hz\n", "D=T_on*f;\n", "disp('part (a)')\n", "disp('duty cycle is '+string(D)+' or '+string(D*100)+'%')\n", "disp('part (b)')\n", "VL_dc=D*V;\n", "disp(VL_dc,'Average Load Voltage,(volts) = ')\n", "disp('part (c)')\n", "VL_rms=sqrt(D)*V;\n", "disp(VL_rms,'RMS Load Voltage,VL_rms(volts) = ')\n", "//part c answer is calculated wrong in book" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5_4: plot_the_variatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5.4:average load voltage and rms load voltage\n", "clc;\n", "clear;\n", "close;\n", "//given data \n", "for i=1:10\n", " sr(i)=i;//\n", " d(1)=0;\n", " d(i+1)=d(i)+0.1;//\n", "end\n", "for i=1:11\n", " v=1;//\n", " vldc(i)=d(i)*v;//\n", " vlrms(i)=sqrt(d(i))*v;//\n", "end\n", "X = [sr];\n", "Y = [d];\n", "Z = [vldc];\n", "U= [vlrms];\n", "disp(Z,'Vldc different values of average load voltage are in volts')\n", "disp(U,'Vlrms diffent values of RMS load voltage are in volts')\n", "plot(d,[vlrms vldc]);\n", "xlabel('DUTY CYCLE D')\n", "ylabel('Vldc & Vlrms Volts')\n", "xtitle('Variation of Vldc and Vlrms with duty cycle D')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5_5: plot_the_variatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5.5:average load voltage and rms load voltage\n", "clc;\n", "clear;\n", "close;\n", "//given data \n", "d=[0.1;0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9;1.0]\n", "for i=1:10\n", " FF(i)=(1/sqrt(d(i)))*100;//\n", " RF(i)=(((((FF(i))/100)^2)-1)^(1/2))*100;//\n", "end\n", "disp(FF,'FF different values of form factor in percentage is')\n", "disp(RF,'RF diffent values of ripple factor in percentage is')\n", "plot(d,[FF RF]);\n", "xlabel('DUTY CYCLE D')\n", "ylabel('FF & RF (%)')\n", "xtitle('Variation of FF and RF with duty cycle D')\n", "hl=legend(['FF %';'RF %']);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5_6: EX6_5_6.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5.6: Average output voltage,RMS output voltage,chopper efficiency and Effective input resistance\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "format('v',6)\n", "r=10;//in ohms\n", "d=0.3;//\n", "v=230;//\n", "vch=1.5;//in volts\n", "D=80/100;// duty cycle\n", "V=220;// in volts\n", "Vch=1.5;//in volts\n", "VL_dc=D*(V-Vch);\n", "disp('part (a)')\n", "disp(VL_dc,'Average output voltage,VL_dc(V) = ')\n", "disp('part (b)')\n", "VL_rms=sqrt(D)*(V-Vch);\n", "disp(VL_rms,'RMS output voltage,VL_rms(V) = ')\n", "disp('part (c)')\n", "Po=((v-vch)^2)*(d/r);//in watts\n", "Pi=((d*v*(v-vch))/r);//in watts\n", "cn=Po/Pi;//chopper efficiency\n", "disp('chopper efficiency is '+string(cn)+' or '+string(cn*100)+'%')\n", "disp('part (d)')\n", "D=80/100;// duty cycle\n", "R=20;//in ohm\n", "Ri=R/D;\n", "disp(Ri,'Effective input resistance,Ri(ohm) = ')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.5_7: average_output_voltage_and_average_load_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.5.7.a;average output voltage and current\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "vs=120;//in volts\n", "vb=1;//in volts\n", "d=0.33;//\n", "rl=10;//in ohms\n", "f=200;//in Hz\n", "Vldc=d*vs;//\n", "Ildc=round(Vldc)/rl;//in amperes\n", "disp(round(Vldc),'average/DC output voltage in volts is')\n", "disp(Ildc,'average load current in amperes is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.6_11: value_of_current_limiting_resistor_maximum_and_minimum_duty_cycle.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.6.11: value of current limiting resistor ,maximum and minimum duty cycle\n", "clc;\n", "clear;\n", "close;\n", "format('v',6)\n", "//given data :\n", "v=325;//in volts\n", "eb=120;//in volts\n", "r=0.2;//in ohms\n", "ra=0.3;//in ohms\n", "e=120;//in volts\n", "rb=0.2;//in ohms\n", "rl=0.3;//in ohms\n", "d=60;//in percentage\n", "i=20;//in amperes\n", "vo=(d/100)*v;//\n", "R=((i*rl)-(v-eb)+(i*rb))/(-i);//\n", "disp('part (a)')\n", "disp(R,'value of current limiting resistor in ohm is')\n", "//value of current limiting resistor is calculated wrong in the textbook\n", "disp('part (b)')\n", "p=15;//\n", "R=9.45;//\n", "vmax=v+(v*(p/100));//\n", "vmin=v-(v*(p/100));//\n", "Dmax=((i*R)/vmin)*100;//\n", "Dmin=((i*R)/vmax)*100;//\n", "disp(Dmax,'maximum duty cycle in percentage is')\n", "disp(Dmin,'minimum duty cycle in percentage is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.6_5: average_armature_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.6.5 : Average armature current\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "V=200;// in volts\n", "D=50/100;// duty cycle\n", "VL_dc=V*D;\n", "Eb=75;// in volts\n", "Ra=1;// in ohm\n", "Ia=(VL_dc-Eb)/Ra;\n", "disp(Ia,'Average armature current,Ia(A) = ')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.6_6: EX6_6_6.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.6.6 :minimum instantaneous load current,peak instantaneous current and maximum peak to peak ripple\n", "clc;\n", "clear;\n", "close;\n", "format('v',6)\n", "v=220;//volts\n", "r=10;//in ohms\n", "l=15.5;//in mH\n", "f=5;//in kHz\n", "Eb=20;//in volts\n", "d=0.5;//\n", "x=exp((-(1-d)*r)/(f*10^3*l*10^-3));//\n", "y=(1-x)*(Eb/r);//\n", "y1=(1-x)*((v-Eb)/r);//\n", "A=[0.94 -0.94*0.94;0.94 -1];\n", "B=[-0.94*0.125;-1.25];\n", "X=A\B;//\n", "disp('part (a)')\n", "disp(X(1,1),'minimum instantaneous current in amperes is')\n", "disp('part (b)')\n", "disp(X(2,1),'peak instantaneous current in amperes is')\n", "disp('part (c)')\n", "PP=X(2,1)-X(1,1);//\n", "disp(PP,'maximum peak to peak ripple in the load current in amperes is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.6_7: load_inductance.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.6.7;inductance\n", "clc;\n", "clear;\n", "close;\n", "v=220;//in volts\n", "r=0.2;//in ohms\n", "ia=200;//in amperes\n", "f=200;//in hz\n", "di=0.05*ia;//in amperes\n", "e=0;//in volts\n", "d=0.5;//\n", "l=((1-d)*v*d*(1/f))/di;//\n", "disp(l*10^3,'inductance in mH is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.6_9: EX6_6_9.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.6.9: load current is continuous or not,Average output current , maximum and minimum steady state output current and RMS values of first and second harmonics of the load current\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "format('v',6)\n", "V=220;//in volts\n", "La=5;// in mH\n", "Eb=24;//in volts\n", "Ra=1;// in ohm\n", "T=2;//in m-sec\n", "D=0.6/2;\n", "D_dash=(La/(T*Ra))*log(1-((Eb/V)*(1-exp((T*Ra)/La))));\n", "disp('part (c)')\n", "disp('As D = '+string(D)+'% is greater then D_dash = '+string(D_dash)+'% so load current is continous')\n", "disp('part (d)')\n", "Io=((D*V)-Eb)/Ra;\n", "disp(Io,'Average output current,Io(A) = ')\n", "I_max=(V/Ra)*((1-exp(-(D*T*Ra)/La))/(1-exp(-(T*Ra)/La)))-(Eb/Ra);\n", "disp(I_max,'Maximum steady state putput current,I_max(A) = ')\n", "I_min=(V/Ra)*((1-exp((D*T*Ra)/La))/(1-exp((T*Ra)/La)))-(Eb/Ra);\n", "disp(round(I_min),'Minimum steady state output current,I_min(A) = ')\n", "disp('part (e)')\n", "C1_rms=((2*V)/(%pi*sqrt(2)))*sin(%pi*D);// in volts\n", "C2_rms=((2*V)/(2*%pi*sqrt(2)))*sin(2*%pi*D);// in volts\n", "Z1=((Ra^2+(2*%pi*La*10^-3*(1/(T*10^-3)))^2)^(1/2));//\n", "Z2=((Ra^2+(2*2*%pi*La*10^-3*(1/(T*10^-3)))^2)^(1/2));//\n", "Ifl=C1_rms/Z1;//in amperes\n", "Ifl1=C2_rms/Z2;//in amperes\n", "disp(Ifl,'fundamental component of load current in amperes is')\n", "disp(Ifl1,'second harmonic component of load current in amperes is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.9_1: output_voltage.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.9.1 : pulse width and output voltage\n", "clc;\n", "clear;\n", "close;\n", "//given data :\n", "v=220;//in volts\n", "vo=660;//in volts\n", "toff=100;//in micro seconds\n", "ton=((vo*toff)/v)-toff;//in micro secondsT=ton+toff;//in micro seconds\n", "T=ton+toff;\n", "f=(1/T);//in Hz\n", "Vo=((v)/(1-(f*(ton/2))));//in volts\n", "disp(ton,'pulse width (ton) in micro seconds is')\n", "disp(Vo,'new output voltage in volts is')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 6.9_2: chopping_frequency_and_output_voltage.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Example 6.9.2 :chopping frequency and new output voltage\n", "clc;\n", "clear;\n", "close;\n", "format('v',8)\n", "//given data :\n", "v=200;//in volts\n", "vo=600;//in volts\n", "ton=200;//in micro seconds\n", "x=-((v/vo)-1);//\n", "f=x/(ton*10^-6);//\n", "ton1=ton/2;//\n", "Vo=((v)/(1-(f*ton1*10^-6)));//in volts\n", "disp(f,'chopping frequency in Hz is')\n", "disp(Vo,'new output voltage in volts is')" ] } ], "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 }