summaryrefslogtreecommitdiff
path: root/Power_Electronics_by_B_R_Gupta_And_V_Singhal
diff options
context:
space:
mode:
authorprashantsinalkar2020-04-14 10:19:27 +0530
committerprashantsinalkar2020-04-14 10:23:54 +0530
commit476705d693c7122d34f9b049fa79b935405c9b49 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Power_Electronics_by_B_R_Gupta_And_V_Singhal
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
downloadall-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2
all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip
Initial commit
Diffstat (limited to 'Power_Electronics_by_B_R_Gupta_And_V_Singhal')
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/1-Power_electronics_devices.ipynb1031
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/2-Controlled_Rectifiers_.ipynb1139
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/3-Inverters.ipynb479
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/4-Choppers.ipynb542
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/5-AC_Regulators.ipynb405
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/6-Cycloconverters.ipynb117
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/7-Applications_of_Thyristors_.ipynb763
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/8-Integrated_circuits_and_operational_amplifiers.ipynb584
-rw-r--r--Power_Electronics_by_B_R_Gupta_And_V_Singhal/9-Number_systems.ipynb664
9 files changed, 5724 insertions, 0 deletions
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/1-Power_electronics_devices.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/1-Power_electronics_devices.ipynb
new file mode 100644
index 0000000..c1732b2
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/1-Power_electronics_devices.ipynb
@@ -0,0 +1,1031 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Power electronics devices"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.10: Find_the_power_supplied_to_load_and_average_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.10\n",
+"clc;\n",
+"disp('If the thyristor is fired at 60 degree')\n",
+"Irms=(0.8405*((%pi-%pi*60/180)-sin(2*%pi)/2+sin(2*%pi*60/180)/2))^0.5;\n",
+"R=100;\n",
+"P=Irms^2*R;\n",
+"printf('Power supplied to load=%.0f W',P)\n",
+"disp('If the thyristor is fired at 45 degree')\n",
+"Irms=(0.8405*((%pi-%pi*45/180)-sin(2*%pi)/2+sin(2*%pi*45/180)/2))^0.5;\n",
+"R=100;\n",
+"P=Irms^2*R;\n",
+"printf('Power supplied to load=%.1f W',P)\n",
+"disp('If the thyristor is fired at 60 degree')\n",
+"Iavg=3.25/(2*%pi)*(-cos(%pi)+cos(%pi*60/180))\n",
+"printf('Average Current=%.3f A',Iavg)\n",
+"disp('If the thyristor is fired at 45 degree')\n",
+"Iavg=3.25/(2*%pi)*(-cos(%pi)+cos(%pi*45/180))\n",
+"printf('Average Current=%.3f A',Iavg)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.11: Calculate_the_average_power_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.11\n",
+"clc;\n",
+"//when conduction period is 2*pi\n",
+"amplitude=200;\n",
+"pd=1.8;\n",
+"power_loss_average= amplitude*pd*2*%pi/(2*%pi);\n",
+"printf('power loss average when conduction period is 2*pi= %.0f W',power_loss_average)\n",
+"\n",
+"//when conduction period is pi\n",
+"amplitude=400;\n",
+"pd=1.9;\n",
+"power_loss_average= amplitude*pd*%pi/(2*%pi);\n",
+"printf('\npower loss average when conduction period is pi= %.0f W',power_loss_average)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.12: Find_the_resistance_to_be_connected_in_series_and_average_power_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.12\n",
+"clc;\n",
+"P_loss_peak=6;\n",
+"Ig=0.763;\n",
+"Vg=1+9*Ig;\n",
+"Rg=(11-9*Ig)/Ig;\n",
+"printf('\nResistance to be connected in series=%.3f ohm', Rg)\n",
+"duty=0.3;\n",
+"P_loss_average=P_loss_peak*duty;\n",
+"printf('\nAverage power loss =%.1f W', P_loss_average)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.13: EX1_13.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.13\n",
+"clc;\n",
+"disp('when current is constant 20A')\n",
+"It=20;\n",
+"Vt=0.9+0.02*It;\n",
+"P_dissipation=Vt*It;\n",
+"printf('Power dissipation=%.0f W',P_dissipation)\n",
+"disp('when current is constant 20A for one half cycle in each full cycle')\n",
+"P_dissipation=Vt*It/2;\n",
+"printf('Power dissipation=%.0f W',P_dissipation)\n",
+"disp('when current is constant 20A for one third cycle in each full cycle')\n",
+"P_dissipation=Vt*It/3;\n",
+"printf('Power dissipation=%.2f W',P_dissipation)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.14: Find_different_current_ratings.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.14\n",
+"clc;\n",
+"Isub=2000;\n",
+"T=10*10^-3;\n",
+"t=5*10^-3;\n",
+"I=(Isub^2*t/T)^0.5;\n",
+"printf('one cycle surge current rating=%.1f A', I)\n",
+"//a=I^2t\n",
+"a=I^2*T;\n",
+"printf('\nI^2t=%.1f A^2Sec', a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.15: Find_source_resistance_gate_current_and_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.15\n",
+"clc;\n",
+"P=0.3;\n",
+"Vs=12;\n",
+"disp('Since load line has a slope of -100V/A, the source resistance for the gate is 100 ohm')\n",
+"Rs=100;\n",
+"// since Vs=Vg+Ig*Rs\n",
+"// on solving Ig=35.5 mA\n",
+"Ig=35.5*10^-3;\n",
+"printf('\nGate current=%.4f A',Ig)\n",
+"Vg=P/Ig;\n",
+"printf('\nGate voltage=%.2f V',Vg)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.16: Find_the_thermal_resistance_and_temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.16\n",
+"clc;\n",
+"l=0.2;\n",
+"w=0.01;\n",
+"d=0.01;\n",
+"the_cond=220;\n",
+"the_res=l/(the_cond*w*d);\n",
+"printf('Thermal resistance = %.3f degree C/W', the_res)\n",
+"T1=30;\n",
+"P=3;\n",
+"T2=P*the_res+T1;\n",
+"printf('\nTemperature of the surface = %.2f degree C', T2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.17: Find_the_maximum_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.17\n",
+"clc;\n",
+"l=2*10^-3;\n",
+"A=12*10^-4;\n",
+"the_cond=220;\n",
+"the_res=l/(the_cond*A);\n",
+"T=4; //T=T2-T1\n",
+"P=T/the_res;\n",
+"printf('Maximum loss which can be handled by module= %.2f W', P)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.18: Find_the_maximum_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.18\n",
+"clc;\n",
+"T2=125;\n",
+"T1=50;\n",
+"T=T2-T1;\n",
+"P=30;\n",
+"Total_the_res=T/P;\n",
+"the_res=Total_the_res-1-0.3;\n",
+"printf('Thermal resistance of heat sink= %.1f degree C/W', the_res)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.19: Design_a_UJT_relaxation_oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.19\n",
+"clc;\n",
+"T=1/50;\n",
+"V=32;\n",
+"Vp=0.63*V+0.5;\n",
+"C=0.4*10^-6;\n",
+"Ip=10*10^-6;\n",
+"Rmax=(V-Vp)/Ip;\n",
+"printf('Rmax=%.0f ohm', Rmax)\n",
+"Vv=3.5;\n",
+"Iv=10*10^-3;\n",
+"Rmin=(V-Vv)/Iv;\n",
+"printf('\nRmin=%.0f ohm', Rmin)\n",
+"R=T/(C*log(1/(1-0.63)));\n",
+"printf('\nR=%.0f ohm', R)\n",
+"disp('since the value of R is between Rmin and Rmax so the value is suitable')\n",
+"R4=50*10^-6/C;\n",
+"printf('\nR4=%.0f ohm', R4)\n",
+"R3=10^4/(0.63*V);\n",
+"printf('\nR3=%.0f ohm', R3)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: Calculate_the_equivalent_capacitance_of_depletion_layer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.1\n",
+"clc;\n",
+"Ic=8*10^-3;\n",
+"//let dv/dt =A\n",
+"A=190*10^6;\n",
+"C=Ic/A*10^12;\n",
+"printf('Equivalent capacitance of depletion layer = %.1f uF', C)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.20: Find_the_values_of_different_components_of_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.20\n",
+"clc;\n",
+"T=.5*10^-3;\n",
+"V=10;\n",
+"Vp=0.6*V+0.5;\n",
+"Ip=5*10^-3;\n",
+"Rmax=(V-Vp)/Ip;\n",
+"printf('Rmax=%.0f ohm', Rmax)\n",
+"C=1*10^-6;\n",
+"R=T/(C*log(1/(1-0.6)));\n",
+"printf('\nR=%.1f ohm', R)\n",
+"disp('since the value of R is less than Rmax so the value is suitable')\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.21: Find_the_time_of_conduction_of_thyristor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.21\n",
+"clc;\n",
+"R=0.8;\n",
+"L=10*10^-6;\n",
+"C=50*10^-6;\n",
+"t0=10^6*%pi/((1/(L*C))-(R^2/(4*L^2)))^0.5;\n",
+"printf('Time of conduction of thyristor= %.2f us', t0)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.22: Find_the_values_of_L_and_C.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.22\n",
+"clc;\n",
+"Ip=16;\n",
+"V=90;\n",
+"// C/L=(Ip/V)^2; (i)\n",
+"// Assume that circuit is reverse biased for one-fourth period of resonant circuit. thus\n",
+"//%pi/2*(L*C)^0.5=40*10^-6; (ii)\n",
+"// on solving (i) and (ii)\n",
+"C=4.527*10^-6;\n",
+"L=C/(Ip/V)^2*10^6;\n",
+"C=4.527*10^-6*10^6;\n",
+"printf('C=%.3f uF',C)\n",
+"printf('\nL=%.2f uH',L)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.23: Find_the_value_of_C.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.23\n",
+"clc;\n",
+"t_off=50*10^-6;\n",
+"R1=10;\n",
+"a=log(2);\n",
+"C=t_off/(a*R1)*10^6;\n",
+"printf('The value of C= %.2f uF',C)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.24: Calculate_the_value_of_C_and_L.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.24\n",
+"clc;\n",
+"Vc=100;\n",
+"IL=40;\n",
+"t_off=40*10^-6*1.5;\n",
+"C=IL*t_off/Vc;\n",
+"printf('The value of capacitor= %.6f F',C)\n",
+"//L>(VC^2*C/IL^2);\n",
+"//IC_peak=Vc*(C/L)^0.5;\n",
+"//IC_peak should be less than maximum load current so if L=2*10^-4\n",
+"L=2*10^-4;\n",
+"IC_peak=Vc*(C/L)^0.5;\n",
+"printf('\nPeak capacitor current= %.2f A',IC_peak)\n",
+"disp('Since the peak capacitor current less than maximum load current 40 A so L=2*10^-4 and C=24uF')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.25: Find_the_commutation_time_and_the_current_rating_of_the_thyristor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.25\n",
+"clc;\n",
+"L=0.1*10^-3;\n",
+"Vc=100;\n",
+"C=10*10^-6;\n",
+"IL=10;\n",
+"t_off=Vc*C/IL*10^6;\n",
+"printf('Commutation time= %.0f us',t_off)\n",
+"disp('The commutation time of the thyristor is more than the turn off time of the main thyristor i.e. 25us and is thus sufficient to commutate the main thyristor')\n",
+"IC_peak= Vc*(C/L)^0.5;\n",
+"printf('Peak capacitor current= %.2f A',IC_peak)\n",
+"disp('The maximum current rating of the thyristor should be more than 31.62A')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.26: Find_the_value_of_R_and_C.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.26\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"L=0.2*10^-3;\n",
+"//a=dv/dt\n",
+"a=25*10^6;\n",
+"sig=0.65;\n",
+"C=(1/(2*L))*(0.564*Vm/a)^2*10^9;\n",
+"R=2*sig*(L/(C*10^-9))^0.5;\n",
+"printf('The value of capacitor= %.2f nF',C)\n",
+"printf('\nThe value of Resistor= %.1f Ohm',R)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.27: Find_the_value_of_R_C_and_snubber_power_loss_and_power_rating_of_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.27\n",
+"clc;\n",
+"f=2000;\n",
+"V=300;\n",
+"RL=10;\n",
+"//a=dv/dt\n",
+"a=100*10^6;\n",
+"R=300/100;\n",
+"C=(0.632*V*RL)/(a*(R+RL)^2)*10^6;\n",
+"printf('The value of capacitor= %.3f uF',C)\n",
+"Power_Loss_snubber=0.5*C*10^-6*V^2*f;\n",
+"printf('\nSnubber Power Loss= %.2f W',Power_Loss_snubber)\n",
+"disp('All the energy stored in the capacitance C is dissipated in resistance R. Hence power Rating of R is 10.1W')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.28: Find_the_maximum_permissible_values.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.28\n",
+"clc;\n",
+"C=6*10^-6;\n",
+"R=4;\n",
+"V=300;\n",
+"L=6*10^-6;\n",
+"b_max=V/L*10^-6; // b=di/dt\n",
+"printf('The maximum permissible value of di/dt = %.0f MA/s',b_max)\n",
+"Isc=V/R;\n",
+"//a=dv/dt\n",
+"a=((R*b_max*10^6)+(Isc/C))*10^-6;\n",
+"printf('\nThe maximum permissible value of dv/dt = %.1f MV/s',a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.29: Find_number_of_thyristor_in_series_and_parallel.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.29\n",
+"clc;\n",
+"Im=750;\n",
+"De=0.25;\n",
+"It=175;\n",
+"np=(Im/It)/(1-De);\n",
+"printf('np = %.2f ',np)\n",
+"disp('so the no. of thyristors in parallel are 6')\n",
+"Vs=3000;\n",
+"De=0.25;\n",
+"Vd=800;\n",
+"ns=(Vs/Vd)/(1-De);\n",
+"printf('ns = %.2f ',ns)\n",
+"disp('so the no. of thyristors in series are 5')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: Calculate_the_voltage_required_to_Turn_ON_the_thyristor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.2\n",
+"clc;\n",
+"disp('When thyristor is not conducting there is no current through it')\n",
+"disp('so Vo=20V')\n",
+"VG=0.75;\n",
+"IG=7*10^-3;\n",
+"RG=2000;\n",
+"Vs=VG+IG*RG;\n",
+"printf('Voltage required to Turn On The thyristor = %.2f V', Vs)\n",
+"R= 200;\n",
+"VR=5*10^-3*R;\n",
+"printf('/nVoltage drop across R = %.0f V', VR)\n",
+"disp('Hence Vcc should be reduced to less than 1V')\n",
+"Vconduct=0.7;\n",
+"Vreq=VR+Vconduct;\n",
+"printf('Voltage required = %.1f V', Vreq)\n",
+"disp('Hence Vcc should be reduced to less than 1.7V')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.30: Find_the_value_of_R_and_C_for_static_and_dynamic_equalizing_circuits.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.30\n",
+"clc;\n",
+"ns=5;\n",
+"Vd=800;\n",
+"Vs=3000;\n",
+"Ib=8*10^-3;\n",
+"dQ=30*10^-6;\n",
+"R=(ns*Vd-Vs)/((ns-1)*Ib)\n",
+"C=((ns-1)*dQ)/(ns*Vd-Vs)*10^6;\n",
+"printf('The value of resistance = %.2f ohm ',R)\n",
+"printf('\nThe value of capacitance = %.2f uF ',C)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.31: Find_the_value_of_resistance_to_be_connected_in_series.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.31\n",
+"clc;\n",
+"R=(1.5-1.2)/100;\n",
+"printf(' The value of resistance to be connected in series= %.3f ohm',R)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.32: Find_the_steady_and_transient_state_rating_and_derating_of_thyristor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.32\n",
+"clc;\n",
+"ns=12;\n",
+"Vd=800;\n",
+"V=16000;\n",
+"Ib=10*10^-3;\n",
+"dQ=150*10^-6;\n",
+"C=0.5*10^-6;\n",
+"R=56*10^3;\n",
+"Vd=(V+(ns-1)*R*Ib)/ns;\n",
+"printf('maximum steady state voltage rating of each thyristor = %.2f V',Vd)\n",
+"De=1-(V/(ns*Vd));\n",
+"printf('\nSteady state voltage derating = %.3f ',De)\n",
+"Vd=(V+(ns-1)*(dQ/C))/ns;\n",
+"printf('\nmaximum transient state voltage rating of each thyristor = %.2f V',Vd)\n",
+"De=1-(V/(ns*Vd));\n",
+"printf('\ntransient state voltage derating = %.3f ',De)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.33: Find_number_of_thyristor_in_series_and_parallel.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.33\n",
+"clc;\n",
+"Im=1000;\n",
+"De=0.14;\n",
+"It=75;\n",
+"np=(Im/It)/(1-De);\n",
+"printf('np = %.2f ',np)\n",
+"disp('so the no. of thyristors in parallel are 16')\n",
+"Vs=7500;\n",
+"De=0.14;\n",
+"Vd=500;\n",
+"ns=(Vs/Vd)/(1-De);\n",
+"printf('ns = %.2f ',ns)\n",
+"disp('so the no. of thyristors in series are 18')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.34: Find_Stored_charge_and_peak_reverse_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.34\n",
+"clc;\n",
+"trr=2.5*10^-6;\n",
+"//b=di/dt\n",
+"b=35*10^6;\n",
+"Qrr=0.5*trr^2*b*10^6;\n",
+"printf(' Stored charge= %.3f uC',Qrr)\n",
+"Irr=(2*Qrr*10^-6*b)^0.5;\n",
+"printf(' Peak reverse current= %.1f A',Irr)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: Find_gate_voltage_gate_current_and_resistance_to_be_connected_in_series.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.3\n",
+"clc;\n",
+"P_loss_avg=0.6;\n",
+"P_loss_conduction=0.6*2*%pi/%pi;\n",
+"Ig=0.314;\n",
+"printf('Ig=%.3f A', Ig)\n",
+"Vg=1+9*Ig;\n",
+"printf('\nVg=%.3f V', Vg)\n",
+"Rg=(24-9*Ig)/Ig;\n",
+"printf('\nResistance to be connected in series=%.2f ohm', Rg)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4: Calculate_the_minimum_width_of_the_gate_pulse.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.4\n",
+"clc;\n",
+"V=100;\n",
+"L=10;\n",
+"i=80*10^-3;\n",
+"t=i*L/V*10^3;\n",
+"printf('t= %.0f ms', t)\n",
+"disp('So the width of the pulse should be more than 8 ms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5: Calculate_the_minimum_width_of_the_gate_pulse.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.5\n",
+"clc;\n",
+"V=100;\n",
+"R=10;\n",
+"i=50*10^-3;\n",
+"t=-0.5*log(1-((i*R/V)))*10^3\n",
+"printf('t= %.1f ms', t)\n",
+"disp('So the minimum width of the gate pulse is 2.5 ms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.6: Find_if_thyristor_will_turn_ON_and_the_value_of_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.6\n",
+"clc;\n",
+"V=90;\n",
+"R=25;\n",
+"t=40*10^-6;\n",
+"L=0.5;\n",
+"i=(V/R)*(1-exp(-R*t/L))\n",
+"iL=40*10^-3;\n",
+"printf('The circuit current is= %.4f A', i)\n",
+"disp('Since the circuit current is less than latching current of 40mA so thyristor will not turn ON')\n",
+"R=V/(iL-i);\n",
+"printf('R= %.0f Ohm', R)\n",
+"disp('R should be less than 2743 ohm')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.7: Find_if_thyristor_will_turn_OFF_and_maximum_value_of_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.7\n",
+"clc;\n",
+"V=100;\n",
+"R=20;\n",
+"t=50*10^-6;\n",
+"L=0.5;\n",
+"i=(V/R)*(1-exp(-R*t/L))\n",
+"iH=50*10^-3;\n",
+"printf('The circuit current is= %.5f A', i)\n",
+"disp('Since the circuit current is less than holding current of 50mA so thyristor will turn OFF')\n",
+"R=V/(iH-i);\n",
+"printf('Maximum value of R= %.3f Ohm', R)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.8: Can_a_negative_gate_current_turn_off_a_thyristor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.8\n",
+"clc;\n",
+"disp('A negative gate current cannot turn off a thyristor. This is due to the reason that cathode region is much bigger in area than gate region')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.9: Find_RMS_current_and_form_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//1.9\n",
+"clc;\n",
+"I=120;\n",
+"gama=180;\n",
+"th=360;\n",
+"I_rms=I*(gama/th)^0.5;\n",
+"printf('The RMS value of current= %.2f A',I_rms)\n",
+"I_avg=I*(gama/th);\n",
+"Form_factor=I_rms/I_avg;\n",
+"printf('\nForm factor= %.3f A',Form_factor)"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/2-Controlled_Rectifiers_.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/2-Controlled_Rectifiers_.ipynb
new file mode 100644
index 0000000..3b1cf9a
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/2-Controlled_Rectifiers_.ipynb
@@ -0,0 +1,1139 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Controlled Rectifiers "
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10: EX2_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.10\n",
+"clc;\n",
+"Vdc=100;\n",
+"Vm=(Vdc+1.7)*%pi/(2*cosd(30));\n",
+"Vrms_sec=Vm/2^0.5;\n",
+"Vrms_pri=230;\n",
+"Turn_ratio=Vrms_pri/Vrms_sec;\n",
+"printf('\nTurn Ratio = %.2f ', Turn_ratio)\n",
+"Ip=15;\n",
+"Irms_sec=(Ip^2/2)^0.5;\n",
+"Trans_rating=2*Vrms_sec*Irms_sec;\n",
+"printf('\nTransformer rating = %.2f VA', Trans_rating)\n",
+"PIV=2*Vm;\n",
+"printf('\nPIV = %.2f V', PIV)\n",
+"printf('\nRMS value of thyristor current = %.2f A', Irms_sec)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.11: Calculate_the_voltage_rating_of_full_wave_central_tap_and_bridge_rectifiers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.11\n",
+"clc;\n",
+"Idc=50;\n",
+"Vdc=10*1000/Idc;\n",
+"Vm=200*%pi/2;\n",
+"PIV_central_tap=2*Vm;\n",
+"V_rating_central_tap =2*PIV_central_tap;\n",
+"printf('The rated voltage of full wave central tap transformer rectifier = %.2f V', V_rating_central_tap )\n",
+"PIV_bridge=Vm;\n",
+"V_rating_bridge=2*PIV_bridge;\n",
+"printf('\nThe rated voltage of full wave bridge rectifier = %.2f V', V_rating_bridge )"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.12: Find_the_output_voltage_firing_angle_and_load_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.12\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vrms=(800/1000*230^2)^0.5;\n",
+"printf('Output Voltage = %.2f V', Vrms )\n",
+"//Vrms=Vm*((%pi-alph)/(2*%pi)+sind(2*alph)/(4*%pi))^0.5 on solving\n",
+"alph=61;\n",
+"printf('\nFiring angle = %.0f degree', alph )\n",
+"I=800/Vrms;\n",
+"printf('\nLoad current = %.2f A', I )"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.13: Find_the_average_power_output_of_full_wave_mid_point_and_bridge_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.13\n",
+"clc;\n",
+"disp('For Mid point converter')\n",
+"Vm=800/(2*2.5);\n",
+"alph=0;\n",
+"Vo=Vm/(%pi)*(1+cosd(alph));\n",
+"Idc=30/2.5;\n",
+"Pdc=Idc*Vo;\n",
+"printf('Average output power = %.2f W', Pdc )\n",
+"disp('For bridge converter')\n",
+"Vm=800/(2.5);\n",
+"alph=0;\n",
+"Vo=Vm/(%pi)*(1+cosd(alph));\n",
+"Idc=30/2.5;\n",
+"Pdc=Idc*Vo;\n",
+"printf('Average output power = %.2f W', Pdc )"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.14: Find_dc_output_voltage_and_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.14\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"alph=30;\n",
+"Vo=Vm/(2*%pi)*(3+cosd(alph));\n",
+"Idc=Vo/10;\n",
+"printf('dc output voltage = %.1f V', Vo )\n",
+"Pdc=Idc*Vo;\n",
+"printf('\ndc power = %.2f W', Pdc )"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.15: Find_dc_output_voltage_and_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.15\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vo=2*Vm/%pi;\n",
+"Idc=Vo/10;\n",
+"printf('dc output voltage = %.2f V', Vo )\n",
+"Pdc=Idc*Vo;\n",
+"printf('\ndc power = %.2f W', Pdc )"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.16: Calculate_the_firing_angle_and_power_factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//\n",
+"clc;\n",
+"disp('If E=100 V')\n",
+"Vm=230*2^0.5;\n",
+"E=100;\n",
+"R=0.5;\n",
+"Io=15;\n",
+"alph=acosd((E+15*0.5)*%pi/(2*Vm));\n",
+"printf('Firing Angle = %.2f degree', alph)\n",
+"pf=(100*15+15^2*0.5)/(230*15);\n",
+"printf('\nPower factor = %.3f lagging', pf)\n",
+"disp('If E=-100 V')\n",
+"E=-100;\n",
+"alph=acosd((E+15*0.5)*%pi/(2*Vm));\n",
+"printf('\nFiring Angle when E is -100 = %.2f W', alph)\n",
+"pf=(100*15-15^2*0.5)/(230*15);\n",
+"printf('\nPower factor = %.3f lagging', pf)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.17: Find_the_average_value_of_load_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.17\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"alph=40;\n",
+"Io=((2*Vm/%pi*cosd(alph))-50)/5;\n",
+"printf('Average value of load current = %.2f A', Io)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.18: EX2_18.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.18\n",
+"clc;\n",
+"Vdc=100;\n",
+"Vm=(Vdc+2*1.7)*%pi/(2*cosd(30));\n",
+"Vrms_sec=Vm/2^0.5;\n",
+"Vrms_pri=230;\n",
+"Turn_ratio=Vrms_pri/Vrms_sec;\n",
+"printf('\nTurn Ratio = %.2f ', Turn_ratio)\n",
+"Irms_sec=15/2^0.5;\n",
+"Ip=15;\n",
+"Trans_rating=Vrms_sec*Ip;\n",
+"printf('\nTransformer rating = %.2f VA', Trans_rating)\n",
+"PIV=Vm;\n",
+"printf('\nPIV = %.2f V', PIV)\n",
+"printf('\nRMS value of thyristor current = %.2f A', Irms_sec)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.19: EX2_19.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.19\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vdc=Vm/%pi*(1+cosd(90));\n",
+"printf('dc value of voltage = %.2f V', Vdc)\n",
+"Vrms=230*((1/%pi)*(%pi-(%pi/2)+sin(%pi)/2))^0.5;\n",
+"printf('\n RMS value of voltage= %.2f V', Vrms)\n",
+"form_factor=Vrms/Vdc;\n",
+"printf('\nForm factor = %.2f ', form_factor)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.20: Calculate_the_different_parameters_of_single_phase_semi_converter_bridge.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.20\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vdc=Vm/%pi*(1+cosd(90));\n",
+"printf('dc value of voltage = %.2f V', Vdc)\n",
+"Vrms=230*((1/%pi)*(%pi-(%pi/2)+sin(%pi)/2))^0.5;\n",
+"printf('\n RMS value of voltage= %.2f V', Vrms)\n",
+"Is=(1-(%pi/2)/%pi)^0.5;\n",
+"Is1=2/%pi*2^0.5*cos(%pi/4);\n",
+"HF=((Is/Is1)^2-1)^0.5;\n",
+"printf('\n Harmonic factor= %.3f ', HF)\n",
+"Displacement_factor=cos(-%pi/4);\n",
+"printf('\n Displacement factor= %.4f ', Displacement_factor)\n",
+"Power_factor=Is1/Is*cos(-%pi/4);\n",
+"printf('\n Power factor= %.4f lagging', Power_factor)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.21: Calculate_the_different_parameters_of_single_phase_full_converter.sci"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.21\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vdc=2*Vm/%pi*cosd(60);\n",
+"printf('dc value of voltage = %.2f V', Vdc)\n",
+"Vrms=230;\n",
+"printf('\n RMS value of voltage= %.2f V', Vrms)\n",
+"Is1=2*2^0.5/%pi;\n",
+"Is=1;\n",
+"HF=((Is/Is1)^2-1)^0.5;\n",
+"printf('\n Harmonic factor= %.3f ', HF)\n",
+"Displacement_factor=cos(-%pi/3);\n",
+"printf('\n Displacement factor= %.1f ', Displacement_factor)\n",
+"Power_factor=Is1/Is*cos(-%pi/3);\n",
+"printf('\n Power factor= %.2f lagging', Power_factor)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.22: EX2_22.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.22\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vdc=2*Vm/%pi*cosd(30);\n",
+"R=Vdc/4;\n",
+"printf('dc value of voltage = %.1f V', Vdc)\n",
+"IL=4;\n",
+"I=2*2^0.5/%pi*IL;\n",
+"P_input_active=230*I*cosd(30);\n",
+"printf('\n Active input power= %.2f W', P_input_active)\n",
+"P_input_reactive=230*I*sind(30);\n",
+"printf('\n reactive input power= %.2f Vars', P_input_reactive)\n",
+"P_input_appearent=230*I;\n",
+"printf('\n Active input power= %.2f VA', P_input_appearent)\n",
+"\n",
+"disp('When freewheeling diode is present')\n",
+"Vm=230*2^0.5;\n",
+"Vdc=Vm/%pi*(1+cosd(30));\n",
+"printf('dc value of voltage = %.1f V', Vdc)\n",
+"IL=Vdc/R;\n",
+"I=2*2^0.5/%pi*IL*cosd(15);\n",
+"P_input_active=230*I*cosd(15);\n",
+"printf('\n Active input power= %.2f W', P_input_active)\n",
+"P_input_reactive=230*I*sind(15);\n",
+"printf('\n reactive input power= %.2f Vars', P_input_reactive)\n",
+"P_input_appearent=230*I;\n",
+"printf('\n Active input power= %.2f VA', P_input_appearent)\n",
+"disp('When Th3 get open circuit')\n",
+"Vdc=230/(2^0.5*%pi)*(1+cosd(30));\n",
+"printf('dc value of voltage = %.3f V', Vdc)\n",
+"Idc=Vdc/R;\n",
+"printf('\nAverage dc output current = %.2f A', Idc)\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.23: EX2_23.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.23\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vdc=2*Vm/%pi*cosd(30);\n",
+"printf('dc value of voltage = %.1f V', Vdc)\n",
+"Irms=10;\n",
+"I=10;\n",
+"printf('\n RMS value of current= %.0f A', Irms)\n",
+"Is1=2*2^0.5/%pi*I;\n",
+"printf('\n Fundamental component of input current= %.0f A', Is1)\n",
+"Is=10;\n",
+"HF=((Is/Is1)^2-1)^0.5;\n",
+"printf('\n Harmonic factor= %.3f ', HF)\n",
+"Displacement_factor=cosd(-30);\n",
+"printf('\n Displacement factor= %.3f ', Displacement_factor)\n",
+"Power_factor=Is1/Is*cos(-%pi/6);\n",
+"printf('\n Power factor= %.3f lagging', Power_factor)\n",
+"Out_rms=230;\n",
+"Form_factor=Out_rms/Vdc;\n",
+"Ripple_factor=(Form_factor^2-1)^0.5;\n",
+"printf('\n Ripple factor= %.3f ', Ripple_factor)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.24: Calculate_peak_circulating_current_and_peak_current_of_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.24\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"alph1=60;\n",
+"alph2=120;\n",
+"w=100*%pi;\n",
+"L=50*10^-3;\n",
+"wt=2*%pi;\n",
+"R=15;\n",
+"Ip_circulating=2*Vm/(w*L)*(cos(wt)-cosd(alph1));\n",
+"printf('\n Peak circulating current= %.1f A',Ip_circulating)\n",
+"Ip_load=Vm/R;\n",
+"Ip_converter1=Ip_circulating+Ip_load;\n",
+"printf('\n Peak current of converter 1= %.2f A', Ip_converter1)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.25: Calculate_inductance_of_current_limiting_reactor_and_peak_current_of_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.25\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"alph1=30;\n",
+"alph2=150;\n",
+"w=100*%pi;\n",
+"wt=2*%pi;\n",
+"R=10;\n",
+"Ip_circulating=10.2;\n",
+"L=2*Vm/(w*Ip_circulating)*(cos(wt)-cosd(alph1));\n",
+"printf('\n Inductance of current limiting Reactor= %.4f H',L)\n",
+"Ip_load=Vm/R;\n",
+"Ip_converter1=Ip_circulating+Ip_load;\n",
+"printf('\n Peak current of converter 1= %.2f A', Ip_converter1)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.26: Calculate_inductance_of_current_limiting_reactor_and_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.26\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"alph1=45;\n",
+"alph2=135;\n",
+"w=100*%pi;\n",
+"wt=2*%pi;\n",
+"R=10;\n",
+"Ip_circulating=11.5;\n",
+"L=2*Vm/(w*Ip_circulating)*(cos(wt)-cosd(alph1));\n",
+"printf('\n Inductance of current limiting Reactor= %.4f H',L)\n",
+"Ip_converter1=39.7;\n",
+"Ip_load= Ip_converter1-Ip_circulating ;\n",
+"R=Vm/Ip_load;\n",
+"printf('\n Load resistance= %.3f ohm', R)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.27: Find_the_parameters_of_three_phase_bridge_rectifier_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.27\n",
+"clc;\n",
+"Vm=400*2^0.5/3^0.5;\n",
+"Vdc=360;\n",
+"alph=acosd(Vdc*%pi/(3*3^0.5*Vm));\n",
+"printf('Firing Angle = %.1f degree', alph)\n",
+"VL=400;\n",
+"IL=200;\n",
+"S=3^0.5*VL*IL;\n",
+"printf('\nApparent Power = %.0f VA',S)\n",
+"P=S*cosd(alph);\n",
+"printf('\nActive Power = %.1f W',P)\n",
+"Q=(S^2-P^2)^0.5;\n",
+"printf('\nReactive Power = %.1f VA',Q)\n",
+"disp('When AC line voltage is 440V')\n",
+"V=440;\n",
+"alph=acosd(Vdc*%pi/(3*2^0.5*V));\n",
+"printf('Firing Angle = %.1f degree', alph)\n",
+"disp('When AC line voltage is 360V')\n",
+"V=360;\n",
+"alph=acosd(Vdc*%pi/(3*2^0.5*V));\n",
+"printf('Firing Angle = %.1f degree', alph)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.28: Find_the_parameters_of_three_phase_full_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2,28\n",
+"clc;\n",
+"Vm=2^0.5*400/3^0.5;\n",
+"Vdc=3*3^0.5*Vm/%pi*cos(%pi/3);\n",
+"Idc=150;\n",
+"Pdc=Vdc*Idc;\n",
+"printf('Output Power = %.1f W', Pdc)\n",
+"Iavg_thy=Idc/3;\n",
+"printf('\nAverage thyristor current = %.0f A', Iavg_thy)\n",
+"Irms_thy=Idc*(2/6)^0.5;\n",
+"printf('\nRMS value of thyristor current = %.1f A', Irms_thy)\n",
+"Ip_thy=Idc;\n",
+"printf('\nPeak current through thyristor = %.0f A', Ip_thy)\n",
+"PIV=2^0.5*400;\n",
+"printf('\nPeak inverse voltage = %.1f V', PIV)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.29: Find_the_firing_angle_of_a_3_phase_fully_controlled_bridge_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.29\n",
+"clc;\n",
+"Vm=400*2^0.5/3^0.5;\n",
+"Vrms=(400*100)^0.5;\n",
+"alph=acosd(((Vrms/(Vm*3^0.5))^2-0.5)/(3*3^0.5/(4*%pi)))/2;\n",
+"printf('Firing angle = %.2f degree', alph)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.30: Find_the_parameters_of_six_pulse_thyristor_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.30\n",
+"clc;\n",
+"Vm=415*2^0.5/3^0.5;\n",
+"Vdc=460;\n",
+"Idc=200;\n",
+"alph=acosd(Vdc*%pi/(3*3^0.5*Vm));\n",
+"printf('Firing Angle = %.2f degree', alph)\n",
+"Pdc=Vdc*Idc;\n",
+"printf('\ndc Power = %.2f W', Pdc)\n",
+"Iac=Idc*(120/180)^0.5;\n",
+"printf('\nAC line current = %.2f A', Iac)\n",
+"Ip=Idc;\n",
+"Irms_thy=Ip*(120/360)^0.5;\n",
+"printf(' \nRMS thyristor current = %.1f A', Irms_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.31: Find_the_parameters_of_three_phase_semi_converter_bridge_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.31\n",
+"clc;\n",
+"Vm=400*2^0.5/3^0.5;\n",
+"alph=0;\n",
+"Vdc_max=3*3^0.5*Vm/(2*%pi)*(1+cosd(alph));\n",
+"Vdc=0.5*Vdc_max;\n",
+"alph=acosd((Vdc/(3*3^0.5*Vm/(2*%pi)))-1)\n",
+"printf('Firing Angle = %.2f degree', alph)\n",
+"R=10;\n",
+"Idc=Vdc/R;\n",
+"disp('For discontinious load')\n",
+"Vrms=(3^0.5*Vm)*((3/(4*%pi))*(%pi-(%pi/2)+0.5*sin(%pi)))^0.5;\n",
+"printf('\nRMS value of voltage = %.2f V', Vrms)\n",
+"Irms=Vrms/R;\n",
+"printf('\nRMS value of current = %.2f A', Irms)\n",
+"I_avg=Idc/3;\n",
+"printf('\nAverage value of thyristor current = %.2f A', I_avg)\n",
+"I_rms=Irms/3^0.5;\n",
+"printf('\nRMS value of thyristor current = %.2f A', I_rms)\n",
+"efficiency=Vdc*Idc/(Vrms*Irms);\n",
+"printf('\nRectification efficiency = %.3f A', efficiency)\n",
+"Irms_line_current=Irms*(120/180)^0.5;\n",
+"VA_input=3*400/3^0.5*Irms_line_current;\n",
+"TUF=Vdc*Idc/VA_input;\n",
+"printf('\nTransformer utilization factor = %.2f ', TUF)\n",
+"output_power_active=Irms^2*R;\n",
+"input_power_active=output_power_active;\n",
+"pf_input=input_power_active/VA_input;\n",
+"printf('\ninput power factor = %.2f lagging', pf_input)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.32: Find_the_parameters_of_three_phase_fully_controlled_bridge_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.31\n",
+"clc;\n",
+"Vm=400*2^0.5/3^0.5;\n",
+"alph=0;\n",
+"Vdc_max=3*3^0.5*Vm/(%pi)*cosd(alph);\n",
+"Vdc=0.5*Vdc_max;\n",
+"alph=acosd(0.5);\n",
+"printf('Firing Angle = %.2f degree', alph)\n",
+"R=10;\n",
+"Idc=Vdc/R;\n",
+"disp('For discontinious load')\n",
+"Vrms=(3^0.5*Vm)*(3*3^0.5/(4*%pi)*cosd(2*alph)+0.5)^0.5;\n",
+"printf('\nRMS value of voltage = %.2f V', Vrms)\n",
+"Irms=Vrms/R;\n",
+"printf('\nRMS value of current = %.2f A', Irms)\n",
+"I_avg=Idc/3;\n",
+"printf('\nAverage value of thyristor current = %.2f A', I_avg)\n",
+"I_rms=Irms/3^0.5;\n",
+"printf('\nRMS value of thyristor current = %.2f A', I_rms)\n",
+"efficiency=Vdc*Idc/(Vrms*Irms);\n",
+"printf('\nRectification efficiency = %.3f A', efficiency)\n",
+"Irms_line_current=Irms*(120/180)^0.5;\n",
+"VA_input=3*400/3^0.5*Irms_line_current;\n",
+"TUF=Vdc*Idc/VA_input;\n",
+"printf('\nTransformer utilization factor = %.2f ', TUF)\n",
+"output_power_active=Irms^2*R;\n",
+"input_power_active=output_power_active;\n",
+"pf_input=input_power_active/VA_input;\n",
+"printf('\ninput power factor = %.2f lagging', pf_input)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.33: Calculate_the_overlap_angles.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.33\n",
+"clc;\n",
+"Vm=326.56;\n",
+"f=50;\n",
+"Ls=0.2*10^-3;\n",
+"Io=200;\n",
+"w=2*%pi*f;\n",
+"a=3*w*Ls*Io/%pi;\n",
+"b=3*3^0.5*Vm/%pi;\n",
+"disp('For firing angle 20 degree')\n",
+"alph=20;\n",
+"Angle_overlap= acosd((b*cosd(alph)-a)/b)-alph;\n",
+"printf('Overlap angle= %.1f degree', Angle_overlap)\n",
+"disp('For firing angle 30 degree')\n",
+"alph=30;\n",
+"Angle_overlap= acosd((b*cosd(alph)-a)/b)-alph;\n",
+"printf('Overlap angle= %.2f degree', Angle_overlap)\n",
+"disp('For firing angle 60 degree')\n",
+"alph=60;\n",
+"Angle_overlap= acosd((b*cosd(alph)-a)/b)-alph;\n",
+"printf('Overlap angle= %.4f degree', Angle_overlap)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.34: Find_the_value_of_circulating_currents_for_3_phase_dual_converter.sci"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.34\n",
+"clc;\n",
+"Vm=400*2^0.5/3^0.5;\n",
+"f=50;\n",
+"w=2*%pi*f;\n",
+"L=60*10^-3;\n",
+"alph=0;\n",
+"disp('Circulating current at wt=0')\n",
+"wt=0;\n",
+"ir=3*Vm/(w*L)*(sind(wt-30)-sind(alph))\n",
+"printf('Circulating current at wt 0 is= %.3f A', ir)\n",
+"disp('Circulating current at wt=30')\n",
+"wt=30;\n",
+"ir=3*Vm/(w*L)*(sind(wt-30)-sind(alph))\n",
+"printf('Circulating current at wt 30 is= %.3f A', ir)\n",
+"disp('Circulating current at wt=90')\n",
+"wt=90;\n",
+"ir=3*Vm/(w*L)*(sind(wt-30)-sind(alph))\n",
+"printf('Circulating current at wt 90 is= %.3f A', ir)\n",
+"disp('Maximum Circulating current will occur at wt=120')\n",
+"wt=120;\n",
+"ir=3*Vm/(w*L)*(sind(wt-30)-sind(alph))\n",
+"printf('Maximum Circulating current is= %.3f A', ir)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.35: Find_the_value_of_inductance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.35\n",
+"clc;\n",
+"Vm=400*2^0.5/3^0.5;\n",
+"f=50;\n",
+"w=2*%pi*f;\n",
+"ir=42;\n",
+"L=3*Vm/(w*ir)*(sind(120-30)-sind(0))\n",
+"printf('Inductance= %.3f H', L)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: Calculate_the_different_parameters_of_half_wave_diode_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.3\n",
+"clc;\n",
+"Vp_sec=230*2^0.5/4;\n",
+"alph=asind(12/Vp_sec);\n",
+"alph1=180-alph;\n",
+"//the diode will conduct from 8.89 degree to 171.51degree\n",
+"Angle_conduction=alph1-alph;\n",
+"printf('Conduction Angle = %.2f degree', Angle_conduction)\n",
+"Idc=4;\n",
+"R=1/(2*Idc*%pi)*(2*Vp_sec*cosd(alph)+(2*12*alph*%pi/180)-12*%pi);\n",
+"printf('\nResistance = %.2f ohm', R)\n",
+"Irms=((1/(2*%pi*R^2))*(((Vp_sec^2/2+12^2)*(%pi-2*alph*%pi/180))+(Vp_sec^2/2*sind(2*alph))-(4*Vp_sec*12*cosd(alph))))^0.5;\n",
+"P_rating=Irms^2*R;\n",
+"printf('\nPower rating of resistor = %.2f W', P_rating)\n",
+"Pdc=12*Idc;\n",
+"t_charging=150/Pdc;\n",
+"printf('\nCharging time = %.3f h', t_charging)\n",
+"Rectifier_efficiency= Pdc/(Pdc+Irms^2*R);\n",
+"printf('\nRectifier efficiency = %.2f ', Rectifier_efficiency)\n",
+"PIV=Vp_sec+12;\n",
+"printf('\nPIV = %.3f V',PIV)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: Calculate_the_different_parameters_of_full_wave_centre_tapped_diode_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.4\n",
+"clc;\n",
+"Vm=100;\n",
+"R=5;\n",
+"Idc=2*Vm/(%pi*R);\n",
+"printf('\nIdc = %.3f A',Idc)\n",
+"Vdc=Idc*R;\n",
+"printf('\nVdc = %.3f V',Vdc)\n",
+"Irms=0.707*Vm/R;\n",
+"printf('\nIrms = %.3f A',Irms)\n",
+"Vrms=Irms*R;\n",
+"printf('\nVrms = %.3f V',Vrms)\n",
+"Pdc=Idc^2*R;\n",
+"printf('\nPdc = %.3f W',Pdc)\n",
+"Pac=Irms^2*R;\n",
+"printf('\nPac = %.3f W',Pac)\n",
+"FF=Vrms/Vdc;\n",
+"printf('\nFF = %.3f ',FF)\n",
+"RF=(FF^2-1)^0.5;\n",
+"printf('\nRF = %.3f ',RF)\n",
+"TUF=0.5732;\n",
+"printf('\nTUF = %.3f ',TUF)\n",
+"PIV=2*Vm;\n",
+"printf('\nPIV = %.0f V',PIV)\n",
+"CF=0.707;\n",
+"printf('\nCF = %.3f ',CF)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: Find_the_RMS_and_average_voltage_and_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.5\n",
+"clc;\n",
+"Vm=400;\n",
+"alpha=30;\n",
+"R=50;\n",
+"Vdc=(Vm/(2*%pi))*(1+cosd(alpha));\n",
+"printf('Average Load voltage = %.1f V', Vdc)\n",
+"Load_current_average=Vdc/R;\n",
+"printf('\nAverage Load current = %.3f A', Load_current_average)\n",
+"V=400*(((%pi-(%pi/6))/(4*%pi))+(sind(60)/(8*%pi)))^0.5;\n",
+"printf('\nRMS voltage = %.1f V', V)\n",
+"RMS_current=V/R;\n",
+"printf('\nRMS current = %.3f A', RMS_current)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: Find_the_average_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.6\n",
+"clc;\n",
+"current_average=(1/(2*%pi))*(-10*cos(5*%pi/6)+10*cos(%pi/6)-(5*5*%pi/6)+(5*%pi/6));\n",
+"printf('\nAverage current = %.3f A', current_average)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: Find_the_average_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.7\n",
+"clc;\n",
+"// the thyristor will conduct when instantenous value of source emf is more than the back emf i.e. 2^0.5*100sin wt=55.5\n",
+"wt1=asind(55.5/(2^0.5*110));\n",
+"wt2=180-wt1;\n",
+"current_average=(1/(2*%pi))*(-15.554*(cosd(wt2)-cosd(wt1))-5.55*(2.7768-0.3684));\n",
+"printf('\nAverage current = %.2f A', current_average)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8: Calculate_the_various_parameters_of_a_single_phase_half_wave_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.8\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vdc=(Vm/(2*%pi))*(1+cosd(90));\n",
+"Idc=Vdc/15;\n",
+"Vrms=Vm*(((%pi-(%pi/2))/(4*%pi))+(sin(2*%pi)/(8*%pi)))^0.5;\n",
+"Irms=Vrms/15;\n",
+"Pdc=Vdc*Idc;\n",
+"Pac=Vrms*Irms;\n",
+"Rec_effi=Pdc/Pac;\n",
+"Form_factor=Vrms/Vdc;\n",
+"printf('\n Form Factor = %.1f ', Form_factor)\n",
+"ripple_factor=(Form_factor^2-1)^0.5;\n",
+"printf('\n Ripple Factor = %.1f ', ripple_factor)\n",
+"VA_rating=230*7.66;\n",
+"printf('\n VA rating = %.1f VA', VA_rating)\n",
+"TUF=Pdc/VA_rating;\n",
+"printf('\n TUF = %.3f ', Form_factor)\n",
+"PIV=Vm;\n",
+"printf('\n PIV = %.1f V', PIV)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9: EX2_9.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//2.9\n",
+"clc;\n",
+"Vm=150*2^0.5;\n",
+"Vdc=(Vm/(%pi))*(1+cosd(45));\n",
+"R=30;\n",
+"Load_current_average=Vdc/R;\n",
+"printf('\nAverage Load current = %.2f A', Load_current_average)\n",
+"Vrms=Vm*(((%pi-(%pi/4))/(2*%pi))+(sind(90)/(4*%pi)))^0.5;\n",
+"printf('\nRMS voltage = %.1f V', Vrms)\n",
+"RMS_current=Vrms/R;\n",
+"printf('\nRMS current = %.3f A', RMS_current)"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/3-Inverters.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/3-Inverters.ipynb
new file mode 100644
index 0000000..b126f66
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/3-Inverters.ipynb
@@ -0,0 +1,479 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Inverters"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10: EX3_10.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.10\n",
+"clc;\n",
+"Ip_load=400/(2*10);\n",
+"Irms_load=(Ip_load^2*2/3)^0.5;\n",
+"printf('RMS value of the load current = %.2f A', Irms_load)\n",
+"Po=Irms_load^2*10*3;\n",
+"printf('\nOutput power = %.2f W', Po)\n",
+"Iavg_thy=Ip_load/3;\n",
+"printf('\nAverage thyristor current = %.2f A', Iavg_thy)\n",
+"Irms_thy=(Ip_load^2/3)^0.5;\n",
+"printf('\nRMS value thyristor current = %.2f A', Irms_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11: EX3_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.11\n",
+"clc;\n",
+"R=10;\n",
+"RL=R+R/2;\n",
+"i1=400/15;\n",
+"i2=i1;\n",
+"i3=i1;\n",
+"Irms_load=(1/(2*%pi)*(i1^2*2*%pi/3+(i1/2)^2*4*%pi/3))^0.5;\n",
+"printf('RMS value of the load current = %.3f A', Irms_load)\n",
+"Po=i1^2*R*3;\n",
+"printf('\nOutput power = %.2f W', Po)\n",
+"Iavg_thy=1/(2*%pi)*(i1*%pi/3+(i1/2*2*%pi/3));\n",
+"printf('\nAverage thyristor current = %.2f A', Iavg_thy)\n",
+"Irms_thy= (1/(2*%pi)*(i1^2*%pi/3+(i1/2)^2*2*%pi/3))^0.5;\n",
+"printf('\nRMS value thyristor current = %.2f A', Irms_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12: EX3_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.12\n",
+"clc;\n",
+"R=10;\n",
+"RL=R+R/2;\n",
+"i1=450/15;\n",
+"Irms_load=(1/(2*%pi)*(i1^2*2*%pi/3+(i1/2)^2*4*%pi/3))^0.5;\n",
+"printf('RMS value of the load current = %.2f A', Irms_load)\n",
+"Irms_thy= (1/(2*%pi)*(i1^2*%pi/3+(i1/2)^2*2*%pi/3))^0.5;\n",
+"printf('\nRMS value thyristor current = %.0f A', Irms_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13: Find_the_parameters_of_single_phase_full_bridge_inverter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.13\n",
+"clc;\n",
+"Vdc=200;\n",
+"VL=Vdc*(5*30/180)^0.5;\n",
+"printf('RMS value of the output voltage = %.2f V', VL)\n",
+"Vdc=220;\n",
+"delta=(VL/Vdc)^2*180/5;\n",
+"printf('\nPulse width = %.2f degree', delta)\n",
+"V=VL/((5*33/180)^0.5);\n",
+"printf('\nMaximum possible input voltage = %.2f V', V)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.14: Calculate_the_RMS_value_of_the_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.14\n",
+"clc;\n",
+"Vdc=200;\n",
+"delta=120;\n",
+"VL=Vdc*(delta/180)^0.5;\n",
+"printf('RMS value of the output voltage = %.1f V', VL)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.15: Calculate_the_RMS_value_of_the_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.15\n",
+"clc;\n",
+"Vdc=150;\n",
+"VL=Vdc*(20/180+60/180+20/180)^0.5;\n",
+"printf('RMS value of the output voltage = %.2f V', VL)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: Find_the_maximum_output_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.1\n",
+"clc;\n",
+"R=80;\n",
+"L=8*10^-3;\n",
+"C=1.2*10^-6;\n",
+"a=R^2;\n",
+"b=4*L/C;\n",
+"printf('R^2 = %.0f ', a)\n",
+"printf('4*L/C = %.0f ', b)\n",
+"disp('since R^2<4L/C it will work as series inverter')\n",
+"fmax=(1/(L*C)-(R^2/(4*L^2)))^0.5;\n",
+"printf('Maximum frequency = %.2f rad/sec', fmax)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: Find_the_frequency_of_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.2\n",
+"clc;\n",
+"f=1416.16;\n",
+"T=1/f;\n",
+"Toff=14*10^-6;\n",
+"fo=1/(T+2*Toff);\n",
+"printf('output frequency = %.1f Hz', fo)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: Find_the_available_circuit_turn_off_time_and_maximum_possible_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.3\n",
+"clc;\n",
+"R=4;\n",
+"L=50*10^-6;\n",
+"C=6*10^-6;\n",
+"a=R^2;\n",
+"b=4*L/C;\n",
+"wr=(1/(L*C)-(R^2/(4*L^2)))^0.5;\n",
+"fr=wr/(2*%pi);\n",
+"Tr=1/fr;\n",
+"fo=6000;\n",
+"wo=2*%pi*fo;\n",
+"toff=%pi*(1/wo-1/wr);\n",
+"printf('Avialable circuit turn off time = %.8f sec', toff)\n",
+"fmax=1/(2*(%pi/wr+6*10^-6));\n",
+"printf('\nMaximum frequency = %.1f Hz', fmax)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: Design_a_parallel_inverter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.4\n",
+"clc;\n",
+"tq=50*10^-6;\n",
+"Vin=40;\n",
+"Vo=230;\n",
+"IL=2;\n",
+"IL_ref=2*Vo/Vin;\n",
+"// C/L=(IL-ref/Vin)^2; (i)\n",
+"// Assume that circuit is reverse biased for one-fourth period of resonant circuit. thus\n",
+"//%pi/3*(L*C)^0.5=50*10^-6; (ii)\n",
+"// on solving (i) and (ii)\n",
+"C=13.73*10^-6;\n",
+"L=C/(IL_ref/Vin)^2*10^6;\n",
+"C=13.73*10^-6*10^6;\n",
+"printf('C=%.3f uF',C)\n",
+"printf('\nL=%.2f uH',L)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: Calculate_the_various_parameters_of_single_phase_half_bridge_inverter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.5\n",
+"clc;\n",
+"V=30;\n",
+"Vrms1=2*V/(2^0.5*%pi);\n",
+"printf('RMS value of fundamental component of input voltage = %.1f V', Vrms1)\n",
+"VL=V/2;\n",
+"R=3;\n",
+"Pout=VL^2/R;\n",
+"printf('\nOutput Power = %.0f W', Pout)\n",
+"Ip_thy=VL/R;\n",
+"printf('\nPeak current in each thyristor = %.0f A', Ip_thy)\n",
+"Iavg=Ip_thy/2;\n",
+"printf('\naverage current in each thyristor = %.1f A', Iavg)\n",
+"PIV=2*VL;\n",
+"printf('\nPeak reverse blocking voltahe = %.0f V', PIV)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: Calculate_the_various_parameters_of_single_phase_full_bridge_inverter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.6\n",
+"clc;\n",
+"V=30;\n",
+"Vrms1=4*V/(2^0.5*%pi);\n",
+"printf('RMS value of fundamental component of input voltage = %.1f V', Vrms1)\n",
+"VL=V;\n",
+"R=3;\n",
+"Pout=VL^2/R;\n",
+"printf('\nOutput Power = %.0f W', Pout)\n",
+"Ip_thy=VL/R;\n",
+"printf('\nPeak current in each thyristor = %.0f A', Ip_thy)\n",
+"Iavg=Ip_thy/2;\n",
+"printf('\naverage current in each thyristor = %.1f A', Iavg)\n",
+"PIV=VL;\n",
+"printf('\nPeak reverse blocking voltahe = %.0f V', PIV)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7: Calculate_the_various_parameters_of_full_bridge_inverter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.7\n",
+"clc;\n",
+"R=10;\n",
+"V=200;\n",
+"IL_rms_funda=9.28/2^0.5;\n",
+"printf('RMS value of fundamental component of load current=%.2f A', IL_rms_funda)\n",
+"IL_peak=(9.28^2+6.55^2+1.89^2+0.895^2+0.525^2);\n",
+"printf('\nPeak value of load current=%.2f A', IL_peak)\n",
+"Irms_harmonic=(11.56^2-9.28^2)^0.5/2^0.5;\n",
+"printf('\nRMS harmonic current=%.3f A',Irms_harmonic)\n",
+"TMH=(11.56^2-9.28^2)^0.5/9.28;\n",
+"printf('\nTotal harmonic distortion=%.3f',TMH)\n",
+"IL_rms=11.56/2^0.5;\n",
+"Po=IL_rms^2*R;\n",
+"printf('\nTotal output power=%.1f W',Po)\n",
+"Po_funda=IL_rms_funda^2*R;\n",
+"printf('\nFundamental Component of power=%.3f W',Po_funda)\n",
+"Iavg=Po/V;\n",
+"printf('\nAverage input current=%.4f A',Iavg)\n",
+"Ip_thy=11.56;\n",
+"printf('\nPeak thyristor current=%.2f A', Ip_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8: Calculate_the_value_of_C_for_proper_load_commutatio.sci"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.8\n",
+"clc;\n",
+"toff=12*1.5*10^-6;\n",
+"f=4000;\n",
+"wt=2*%pi*f*toff;\n",
+"Xl=10;\n",
+"R=2;\n",
+"Xc=R*tan(wt)+Xl;\n",
+"C=1/(2*%pi*f*Xc)*10^6;\n",
+"printf('Value of C for proper load commutation = %.2f uF', C)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9: Calculate_peak_value_of_load_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//3.9\n",
+"clc;\n",
+"I1=6.84;\n",
+"I3=0.881;\n",
+"I5=0.32;\n",
+"I7=0.165;\n",
+"Ip=(I1^2+I3^2+I5^2+I7^2)^0.5;\n",
+"printf('Peak value of load current=%.2f A', Ip)"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/4-Choppers.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/4-Choppers.ipynb
new file mode 100644
index 0000000..b5f998b
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/4-Choppers.ipynb
@@ -0,0 +1,542 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Choppers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: Calculate_average_load_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.10\n",
+"clc;\n",
+"Ton=25*10^-3;\n",
+"Toff=10*10^-3;\n",
+"V=230;\n",
+"VL=V*Ton/(Ton+Toff);\n",
+"printf('\nAverage value of Load voltage = %.3f V', VL)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: Find_maximum_minimum_and_average_load_current_and_load_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.11\n",
+"clc;\n",
+"V=100;\n",
+"R=0.5;\n",
+"L=1*10^-3;\n",
+"T=3*10^-3;\n",
+"Duty_cycle=0.3333;\n",
+"E=0;\n",
+"Imax=V/R*((1-exp(-Duty_cycle*T*R/L))/(1-exp(-T*R/L)))-E/R;\n",
+"printf('\nImax = %.2f A', Imax)\n",
+"Imin=V/R*((exp(Duty_cycle*T*R/L)-1)/(exp(T*R/L)-1))-E/R;\n",
+"printf('\nImin = %.1f A', Imin)\n",
+"IL_avg=(Imax+Imin)/2;\n",
+"printf('\nAverage Load current = %.1f A', IL_avg)\n",
+"Vavg=Duty_cycle*V;\n",
+"printf('\nAverage Load Voltage = %.2f V', Vavg)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: Find_maximum_minimum_and_average_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.12\n",
+"clc;\n",
+"V=100;\n",
+"R=0.2;\n",
+"L=0.8*10^-3;\n",
+"T=2.4*10^-3;\n",
+"Duty_cycle=1/2.4;\n",
+"E=0;\n",
+"Imax=V/R*((1-exp(-Duty_cycle*T*R/L))/(1-exp(-T*R/L)))-E/R;\n",
+"printf('\nImax = %.2f A', Imax)\n",
+"Imin=V/R*((exp(Duty_cycle*T*R/L)-1)/(exp(T*R/L)-1))-E/R;\n",
+"printf('\nImin = %.2f A', Imin)\n",
+"Vavg=Duty_cycle*V;\n",
+"printf('\nAverage output Voltage = %.2f V', Vavg)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: Calculate_the_series_inductance_in_the_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.13\n",
+"clc;\n",
+"V=500;\n",
+"f=400;\n",
+"I=10;\n",
+"L=V/(4*f*I);\n",
+"printf('Series inductance = %.5f H', L)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: Calculate_the_motor_speed_and_current_swing.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.14\n",
+"clc;\n",
+"Motor_output=300*735.5/1000;\n",
+"efficiency=0.9;\n",
+"Motor_input=Motor_output/efficiency;\n",
+"Vdc=800;\n",
+"Rated_current=Motor_input*1000/800;\n",
+"R=0.1;\n",
+"L=100*10^-3;\n",
+"T=1/400;\n",
+"emf=Vdc-Rated_current*0.1;\n",
+"Duty_cycle=0.2;\n",
+"emf_n=Duty_cycle*Vdc-Rated_current*0.1;\n",
+"N=900/(emf/emf_n);\n",
+"printf('\nSpeed of motor = %.2f rpm', N)\n",
+"dia=(Vdc-Duty_cycle*Vdc)/L*Duty_cycle*T;\n",
+"printf('\nCurrent swing = %.1f A', dia)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: Calculate_the_value_of_capacitance_and_inductance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.15\n",
+"clc;\n",
+"Vc=200;\n",
+"Im=60;\n",
+"toff=15*10^-6;\n",
+"C1=toff*Im/Vc;\n",
+"C=5*10^-6*10^6;\n",
+"printf('\nCapacitance = %.0f uF', C)\n",
+"Ipc=Im*1.5-Im;\n",
+"L=C/(Ipc/Vc)^2*10^6;\n",
+"printf('\nInductance = %.1f uH', L)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.16: Calculate_the_period_of_conduction_of_a_step_up_chopper.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.16\n",
+"clc;\n",
+"Vav=250;\n",
+"V=200;\n",
+"Toff=0.6*10^-3;\n",
+"Ton=(Vav/V)*Toff-Toff;\n",
+"printf('Period of conduction = %.5f sec', Ton)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.17: Calculate_the_period_of_conduction_of_a_step_up_chopper.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.16\n",
+"clc;\n",
+"Vav=250;\n",
+"V=150;\n",
+"Toff=1*10^-3;\n",
+"Ton=(Vav/V)*Toff-Toff;\n",
+"printf('Period of conduction = %.6f sec', Ton)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: Calculate_the_period_of_conduction_and_blocking.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.1\n",
+"clc;\n",
+"f=1000;\n",
+"T=1/f;\n",
+"Vav=150;\n",
+"V=230;\n",
+"Ton=(Vav/V)*T;\n",
+"printf('Period of conduction = %.6f sec', Ton)\n",
+"Toff=T-Ton;\n",
+"printf('\nPeriod of blocking = %.6f sec', Toff)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Calculate_the_period_of_conduction_and_blocking.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.2\n",
+"clc;\n",
+"f=500;\n",
+"T=1/f;\n",
+"Vav=15*(0.06+0.03)+100;\n",
+"V=200;\n",
+"Ton=(Vav/V)*T;\n",
+"printf('Period of conduction = %.7f sec', Ton)\n",
+"Toff=T-Ton;\n",
+"printf('\nPeriod of blocking = %.7f sec', Toff)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Calculate_the_duty_cycle_for_the_rated_torque_and_half_of_rated_torque.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.3\n",
+"clc;\n",
+"Vs=240;\n",
+"emf_800=Vs-20*0.5;\n",
+"emf_600=230*600/800;\n",
+"Vav=emf_600+20*0.5;\n",
+"Duty_cycle=Vav/Vs;\n",
+"printf('Duty cycle when motor develop the rated torque = %.4f ', Duty_cycle)\n",
+"//when motor develop half of the rated torque\n",
+"Vav=emf_600+10*0.5;\n",
+"Duty_cycle=Vav/Vs;\n",
+"printf('\nDuty cycle when motor develop half of the rated torque = %.4f ', Duty_cycle)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Find_the_different_parameters_of_a_dc_chopper.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.4\n",
+"clc;\n",
+"Duty_cycle=0.4;\n",
+"Vs=200;\n",
+"Vd=2;\n",
+"Vav=Duty_cycle*(Vs-Vd);\n",
+"printf('Average output voltage = %.1f V', Vav)\n",
+"VL=Duty_cycle^0.5*(Vs-Vd);\n",
+"printf('\nRMS output voltage = %.3f V', VL)\n",
+"R=8;\n",
+"Po=VL^2/R;\n",
+"Pi=Duty_cycle*Vs*(Vs-Vd)/R;\n",
+"Chopper_efficiency=Po/Pi*100;\n",
+"printf('\nChopper efficiency = %.0f percent', Chopper_efficiency)\n",
+"Rin=R/Duty_cycle;\n",
+"printf('\nInput resistance = %.0f Ohm', Rin)\n",
+"V1=126.05/2^0.5;\n",
+"printf('\nRMS value of fundamental component = %.3f V', V1)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Find_the_chopper_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.5\n",
+"clc;\n",
+"Duty_cycle=0.25;\n",
+"V=400;\n",
+"Vav=Duty_cycle*V;\n",
+"Vn=V-Vav;\n",
+"L=0.05;\n",
+"di=10;\n",
+"Ton=L*di/Vn;\n",
+"T=Ton/Duty_cycle;\n",
+"f=1/T;\n",
+"printf('\nChopper frequency = %.0f Hz', f)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Find_the_different_parameters_of_a_chopper_feeding_a_RL_load.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.6\n",
+"clc;\n",
+"V=200;\n",
+"R=4;\n",
+"L=6*10^-3;\n",
+"f=1000;\n",
+"T=1/f;\n",
+"Duty_cycle=0.5;\n",
+"E=0;\n",
+"Imax=V/R*((1-exp(-Duty_cycle*T*R/L))/(1-exp(-T*R/L)))-E/R;\n",
+"printf('\nImax = %.2f A', Imax)\n",
+"Imin=V/R*((exp(Duty_cycle*T*R/L)-1)/(exp(T*R/L)-1))-E/R;\n",
+"printf('\nImin = %.2f A', Imin)\n",
+"Maximum_ripple=V/(R*f*L);\n",
+"printf('\nMaximum ripple = %.2f A', Maximum_ripple)\n",
+"IL_avg=(Imax+Imin)/2;\n",
+"printf('\nAverage Load current = %.0f A', IL_avg)\n",
+"iL=(Imin^2+(Imax-Imin)^2/3+Imin*(Imax-Imin))^0.5;\n",
+"printf('\nRMS value of Load current = %.2f A', iL)\n",
+"Iavg=0.5*IL_avg;\n",
+"printf('\nAverage value of input current = %.2f A', Iavg)\n",
+"Irms=Duty_cycle^0.5*iL;\n",
+"printf('\nRMS value of input current = %.3f A', Irms)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: Calculate_the_load_inductance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.7\n",
+"clc;\n",
+"V=300;\n",
+"E=0;\n",
+"R=5;\n",
+"f=250;\n",
+"Id=0.2*30;\n",
+"L=V/(4*f*Id);\n",
+"printf('Load inductance = %.3f H', L)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: Calculate_the_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.8\n",
+"clc;\n",
+"V=200;\n",
+"E=100;\n",
+"R=0.5;\n",
+"t=2*10^-3;\n",
+"L=16*10^-3;\n",
+"Imin=10;\n",
+"i=(V-E)/R*(1-exp(-R*t/L))+Imin*exp(-R*t/L);\n",
+"printf('Current at the instant of turn off thyristor = %.2f A', i)\n",
+"t=5*10^-3;\n",
+"i_5=i*exp(-R*t/L);\n",
+"printf('\nCurrent after 5ms of turn off thyristor = %.2f A', i_5)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Find_the_speed_of_motor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//4.9\n",
+"clc;\n",
+"emf=220;\n",
+"duty_cycle=0.6;\n",
+"Vi=220*duty_cycle;\n",
+"Ra=1;\n",
+"I=20;\n",
+"emf_back=Vi-I*Ra;\n",
+"N_no_load=1000;\n",
+"N=emf_back*N_no_load/emf;\n",
+"printf('\nSpeed of motor = %.1f rpm', N)"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/5-AC_Regulators.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/5-AC_Regulators.ipynb
new file mode 100644
index 0000000..1b96d73
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/5-AC_Regulators.ipynb
@@ -0,0 +1,405 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: AC Regulators"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10: Find_the_current_and_voltage_rating.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.10\n",
+"clc;\n",
+"V=415;\n",
+"P=20*10^3;\n",
+"disp('For Triacs')\n",
+"I_line=P/(3^0.5*V);\n",
+"Irms=I_line*1.5;\n",
+"printf('RMS current rating of each triac=%.2f A', Irms)\n",
+"Vrms=1.5*V;\n",
+"printf('\nRMS Voltage rating of each triac=%.2f V', Vrms)\n",
+"disp('For reverse connected thyristors')\n",
+"Irms_thy=1.5*I_line/2^0.5;\n",
+"printf('RMS current rating of each thyristor=%.2f A', Irms_thy)\n",
+"Vrms_thy=1.5*V;\n",
+"printf('\nRMS voltage rating of each thyristor=%.2f V', Vrms_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: EX5_11.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.11\n",
+"clc;\n",
+"R=15;\n",
+"Vrms_input_phase=415/3^0.5;\n",
+"VL=3^0.5*2^0.5*Vrms_input_phase*(1/(%pi)*(%pi/6-30*%pi/(180*4)+sind(60)/8))^0.5;\n",
+"printf('\nRMS value of output voltage per phase=%.2f V', VL)\n",
+"Po=3*VL^2/R;\n",
+"printf('\nPower output =%.1f W', Po) \n",
+"I_line=VL/R;\n",
+"printf('\nLine Current =%.2f A', I_line)\n",
+"VA_input=3*Vrms_input_phase*I_line;\n",
+"pf_input=Po/VA_input;\n",
+"printf('\nInput Power Factor =%.3f lagging', pf_input)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: EX5_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.12\n",
+"clc;\n",
+"R=15;\n",
+"Vrms_input_phase=415/3^0.5;\n",
+"VL=3^0.5*2^0.5*Vrms_input_phase*(1/(%pi)*(%pi/6-60*%pi/(180*4)+sind(120)/8))^0.5;\n",
+"printf('\nRMS value of output voltage per phase=%.2f V', VL)\n",
+"Po=3*VL^2/R;\n",
+"printf('\nPower output =%.1f W', Po) \n",
+"I_line=VL/R;\n",
+"printf('\nLine Current =%.2f A', I_line)\n",
+"VA_input=3*Vrms_input_phase*I_line;\n",
+"pf_input=Po/VA_input;\n",
+"printf('\nInput Power Factor =%.3f lagging', pf_input)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: EX5_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.1\n",
+"clc;\n",
+"Vin=150;R=8;\n",
+"duty_cycle=36/(36+64);\n",
+"VL=Vin*duty_cycle^0.5;\n",
+"printf('RMS output voltage=%.0f V', VL) \n",
+"Po=VL^2/R;\n",
+"printf('\nPower output =%.1f W', Po) \n",
+" // since losses are neglected\n",
+" Pi=Po;\n",
+"printf('\nPower Input =%.1f W', Pi) \n",
+"Irms_load=VL/R;\n",
+"Irms_input=11.25;\n",
+"VA_input=Irms_input*Vin;\n",
+"pf_input=Po/VA_input;\n",
+"printf(' \nInput Power factor =%.1f lagging', pf_input) \n",
+"Ip_thy=2^0.5*Vin/R;\n",
+"Iavg_thy=duty_cycle*Ip_thy/%pi;\n",
+"printf('\nAverage thyristor Current =%.3f A', Iavg_thy) \n",
+"Irms_thy=Ip_thy*duty_cycle^0.5/2;\n",
+"printf('\nRMS thyristor Current =%.3f A', Irms_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: Calculate_the_different_parameters_of_single_phase_half_wave_AC_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.2\n",
+"clc;\n",
+"Vm=2^0.5*150;\n",
+"alph=60;\n",
+"R=8;\n",
+"Vin=150;\n",
+"Vavg_out=Vm*(cosd(alph)-1)/(2*%pi);\n",
+"printf('Average output voltage =%.2f V', Vavg_out) \n",
+"disp('The average output voltage is negative only a part of positive half cycle appears at the output whereas the whole negative half cycle appears at the output')\n",
+"VL=Vm*(1/(4*%pi)*(2*%pi-60*%pi/180+sind(120)/2))^0.5;\n",
+"printf('\nRMS output voltage =%.2f V', VL) \n",
+"Po=VL^2/R;\n",
+"printf('\nPower output =%.1f W', Po) \n",
+"Iin=VL/R;\n",
+"VA_input=Iin*Vin;\n",
+"pf_input=Po/VA_input;\n",
+"printf(' \nInput Power factor =%.2f lagging', pf_input) \n",
+"Iavg_out=Vavg_out/R;\n",
+"Iavg_input=Iavg_out;\n",
+"printf(' \nAverage input current =%.2f A', Iavg_input)\n",
+"disp('The average input current is negative because input current during positive half cycle is less than during negative half cycle ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: Calculate_the_different_parameters_of_single_phase_full_wave_AC_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.3\n",
+"clc;\n",
+"Vin=150;\n",
+"Vm=2^0.5*Vin;\n",
+"alph=60;\n",
+"R=8;\n",
+"Vavg_out=Vm*(cosd(alph)+1)/(%pi);\n",
+"printf('Average output voltage over half cycle =%.2f V', Vavg_out) \n",
+"VL=Vm*(1/(2*%pi)*(%pi-60*%pi/180+sind(120)/2))^0.5;\n",
+"printf('\nRMS output voltage =%.2f V', VL) \n",
+"Po=VL^2/R;\n",
+"printf('\nPower output =%.1f W', Po) \n",
+"Iin=VL/R;\n",
+"VA_input=Iin*Vin;\n",
+"pf_input=Po/VA_input;\n",
+"printf(' \nInput Power factor =%.1f lagging', pf_input) \n",
+"\n",
+"Iavg_thy=Vm*(1+cosd(alph))/(2*%pi*R);\n",
+"printf('\nAverage thyristor Current =%.2f A', Iavg_thy) \n",
+"Irms_thy=Vm/(2*R)*(1/(%pi)*(%pi-%pi/3+sind(120)/2))^0.5;\n",
+"printf('\nRMS thyristor Current =%.3f A', Irms_thy)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: Calculate_the_different_parameters_of_single_phase_full_wave_AC_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.4\n",
+"clc;\n",
+"Vin=120;\n",
+"Vm=2^0.5*Vin;\n",
+"alph=90;\n",
+"R=10;\n",
+"\n",
+"VL=Vm*(1/(2*%pi)*(%pi-90*%pi/180+sind(180)/2))^0.5;\n",
+"printf('\nRMS output voltage =%.2f V', VL) \n",
+"Po=VL^2/R;\n",
+"IL=VL/R;\n",
+"VA_input=IL*Vin;\n",
+"pf_input=Po/VA_input;\n",
+"printf(' \nInput Power factor =%.3f lagging', pf_input) \n",
+"\n",
+"Iavg_thy=Vm*(1+cosd(alph))/(2*%pi*R);\n",
+"printf('\nAverage thyristor Current =%.2f A', Iavg_thy) \n",
+"Irms_thy=IL/2^0.5;\n",
+"printf('\nRMS thyristor Current =%.3f A', Irms_thy)\n",
+"Irms_load=VL/R;\n",
+"printf('\nRMS Load Current =%.3f A', Irms_load)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: Find_RMS_output_voltage_and_average_power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.5\n",
+"clc;\n",
+"Vin=110;\n",
+"Vm=2^0.5*Vin;\n",
+"alph=60;\n",
+"R=400;\n",
+"VL=Vm*(1/(2*%pi)*(%pi-60*%pi/180+sind(120)/2))^0.5;\n",
+"printf('\nRMS output voltage =%.2f V', VL) \n",
+"Po=VL^2/R;\n",
+"printf('\nPower output =%.2f W', Po) "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: Find_the_firing_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.6\n",
+"clc;\n",
+"disp('When the power delivered is 80% we have')\n",
+"//0.8=1/(%pi)*(%pi-alph+sin(2*alph)/2)\n",
+"//on solving\n",
+"alph=60.5;\n",
+"printf('Firing angle=%.1f degree',alph)\n",
+"disp('When the power delivered is 30% we have')\n",
+"//0.3=1/(%pi)*(%pi-alph+sin(2*alph)/2)\n",
+"//on solving\n",
+"alph=108.6;\n",
+"printf('Firing angle=%.1f degree',alph)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: Find_the_conduction_angle_and_RMS_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.7\n",
+"clc;\n",
+"f=50;\n",
+"Vin=150;\n",
+"w=2*%pi*f;\n",
+"L=22*10^-3;R=4;\n",
+"th=atand(w*L/R);\n",
+"Beta=180+th;\n",
+"printf('Conduction angle of thyristor=%.0f degree',Beta)\n",
+"Vm=2^0.5*Vin;\n",
+"VL=Vm*(1/(2*%pi)*(%pi++sind(120)/2-sind(2*240)/2))^0.5;\n",
+"printf('\nRMS output Voltage=%.0f V', VL)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: Calculate_the_different_parameters_of_single_phase_full_wave_AC_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//5.8\n",
+"clc;\n",
+"f=50;\n",
+"Vin=230;\n",
+"w=2*%pi*f;\n",
+"L=20*10^-3;R=5;\n",
+"th=atand(R/(w*L));\n",
+"printf('Firing angle=%.2f degree',th)\n",
+"disp('Therefore, Range of firing angle is 38.51 degree to 180 degree')\n",
+"Beta=180;\n",
+"printf('Conduction angle of thyristor=%.0f degree',Beta)\n",
+"IL=Vin/((R^2+w^2*L^2))^0.5;\n",
+"printf(' \nRMS load current =%.2f A', IL)\n",
+"Po=IL^2*R;\n",
+"printf(' \nPower Output =%.2f W', Po)\n",
+"pf_input=Po/(Vin*IL);\n",
+"printf(' \nInput Power factor =%.3f lagging', pf_input)"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/6-Cycloconverters.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/6-Cycloconverters.ipynb
new file mode 100644
index 0000000..fd9d67c
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/6-Cycloconverters.ipynb
@@ -0,0 +1,117 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Cycloconverters"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Find_the_input_voltage_SCR_rating_and_Input_Power_Factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//6.1\n",
+"clc;\n",
+"Vo_max=250;\n",
+"Vm=Vo_max*%pi*2^0.5/(3*sin(%pi/3));\n",
+"Vrms=Vm/2^0.5;\n",
+"printf('RMS value of input voltage =%.1f V', Vrms)\n",
+"I=50;\n",
+"Irms=I*2^0.5/3^0.5;\n",
+"PIV=3^0.5*Vm;\n",
+"Irms_input=(I^2/3)^0.5;\n",
+"Po=Vo_max*I*0.8;\n",
+"Pi_per_phase=1/3*Po;\n",
+"pf_input=Pi_per_phase/(Irms_input*Vrms)\n",
+"printf('\nInput power factor =%.3f lagging', pf_input)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Find_RMS_value_of_output_voltage_for_firing_angle_30_and_45_degree.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//6.2\n",
+"clc;\n",
+"Vo_max=250;\n",
+"alph=30;\n",
+"Vo=Vo_max*cosd(alph);\n",
+"printf('RMS value of output voltage for firing angle 30 degree =%.1f V', Vo)\n",
+"alph=45;\n",
+"Vo=Vo_max*cosd(alph);\n",
+"printf('\nRMS value of output voltage for firing angle 45 degree =%.2f V', Vo)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Find_RMS_value_of_output_voltage_for_firing_angle_0_and_30_degree.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//6.3\n",
+"clc;\n",
+"Vrms=230;\n",
+"alph=0;\n",
+"Vo=6*2^0.5*Vrms/(%pi*2^0.5)*sin(%pi/6)*cosd(alph);\n",
+"printf('RMS value of output voltage for firing angle 0 degree =%.2f V', Vo)\n",
+"alph=30;\n",
+"Vo=6*2^0.5*Vrms/(%pi*2^0.5)*sin(%pi/6)*cosd(alph);\n",
+"printf('\nRMS value of output voltage for firing angle 30 degree =%.1f V', Vo)"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/7-Applications_of_Thyristors_.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/7-Applications_of_Thyristors_.ipynb
new file mode 100644
index 0000000..fc3ef77
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/7-Applications_of_Thyristors_.ipynb
@@ -0,0 +1,763 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Applications of Thyristors "
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10: Find_the_torque_developed_and_motor_speed.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.10\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vf=2*Vm/%pi;\n",
+"alph_a=%pi/4;\n",
+"Va=(2*Vm/%pi)*cos(alph_a);\n",
+"Rf=200;\n",
+"If=Vf/Rf;\n",
+"Kt=1.1;\n",
+"Ia=50;\n",
+"T=Ia*(Kt*If);\n",
+"printf('Torque of motor=%.3f Nm', T)\n",
+"Ra=0.25;\n",
+"Vb=Va-Ia*Ra-2;\n",
+"w=Vb/(Kt*If);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed of motor=%.1f rpm', N)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11: Find_armature_current_and_Firing_angle_of_the_semi_converter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.11\n",
+"clc;\n",
+"Vm=675*2^0.5;\n",
+"Ia1=30;\n",
+"N1=350;\n",
+"N2=500;\n",
+"Ia2=Ia1*N2/N1;\n",
+"printf('Armature current of the semi converter=%.2f A',Ia2)\n",
+"Va1=(1+cos(90.5*%pi/180))*Vm/%pi;\n",
+"Eb1=Va1-Ia1*(0.22+0.22);\n",
+"Eb2=Eb1*Ia2*N2/(Ia1*N1);\n",
+"Va2=Eb2+Ia2*(0.22+0.22);\n",
+"alph_a=acosd(Va2*%pi/Vm-1);\n",
+"printf('\nFiring angle of the semi converter=%.2f degree',alph_a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.12: EX7_12.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.12\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Eg=-131.9\n",
+"Ia=50;\n",
+"Ra=0.25;\n",
+"Va=Eg+Ia*Ra+2;\n",
+"alph_a=acosd(Va*%pi/(2*Vm))\n",
+"printf('Firing angle of converter in the armature circuit=%.2f degree',alph_a)\n",
+"Po=abs(Va*Ia);\n",
+"printf('\npower back to source=%.3f W',Po)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.13: Find_the_firing_angle_of_converter_in_the_armature_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.13\n",
+"clc;\n",
+"Vm=400*2^0.5/(3^0.5);\n",
+"Vf=3*3^0.5*Vm/%pi;\n",
+"Rf=250;\n",
+"If=Vf/Rf;\n",
+"Kt=1.33;\n",
+"Ia=50;\n",
+"w=2*%pi*1200/60;\n",
+"Vb=Kt*w*If;\n",
+"Ra=0.3;\n",
+"Va=Vb+Ia*Ra;\n",
+"alph_a=acosd(Va/Vf);\n",
+"printf('Firing angle of converter in the armature circuit=%.3f degree',alph_a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.14: Find_the_input_power_speed_and_torque_of_separately_excited_dc_motor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.14\n",
+"clc;\n",
+"V=500;\n",
+"Ia=200;\n",
+"Ra=0.1;\n",
+"Pi=V*Ia*0.5;\n",
+"printf('Input power=%.0f W', Pi)\n",
+"Va=0.5*500;\n",
+"Eb=Va-Ia*Ra;\n",
+"If=2;\n",
+"Kt=1.4;\n",
+"w=Eb/(Kt*If)\n",
+"N=w*60/(2*%pi)\n",
+"printf('\nSpeed=%.2f rpm', N)\n",
+"T=Kt*If*Ia;\n",
+"printf('\nTorque=%.0f N-m', T)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.15: Find_the_average_voltage_power_dissipated_and_motor_speed_of_the_chopper.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.15\n",
+"clc;\n",
+"Rb=7.5;\n",
+"Ra=0.1;\n",
+"Kt=1.4;\n",
+"Ia=120;\n",
+"If=1.6;\n",
+"Duty_cycle=0.35;\n",
+"Vavg=Rb*Ia*(1-Duty_cycle);\n",
+"printf('Average voltage across chopper=%.0f V', Vavg)\n",
+"Pb=Rb*Ia^2*(1-Duty_cycle);\n",
+"printf('\nPower dissipated in breaking resistance=%.0f W', Pb)\n",
+"Eb=Vavg+Ia*Ra;\n",
+"w=Eb/(Kt*If);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed=%.2f rpm', N)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.16: Find_the_speed_for_different_values_of_torque.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.16\n",
+"clc;\n",
+"Vm=220*2^0.5;\n",
+"alph=90;\n",
+"Va=3*3^0.5*Vm*(1+cosd(alph))/(2*%pi);\n",
+"Kt=2;\n",
+"Ra=0.72;\n",
+"disp('For armature current of 5A')\n",
+"Ia=5;\n",
+"T=Ia*Kt;\n",
+"printf('\nTorque=%.2f N-m', T)\n",
+"Eb=Va-Ia*Ra;\n",
+"w=Eb/(Kt);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed=%.2f rpm', N)\n",
+"disp('For armature current of 10A')\n",
+"Ia=10;\n",
+"T=Ia*Kt;\n",
+"printf('\nTorque=%.2f N-m', T)\n",
+"Eb=Va-Ia*Ra;\n",
+"w=Eb/(Kt);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed=%.2f rpm', N)\n",
+"disp('For armature current of 20A')\n",
+"Ia=20;\n",
+"T=Ia*Kt;\n",
+"printf('\nTorque=%.2f N-m', T)\n",
+"Eb=Va-Ia*Ra;\n",
+"w=Eb/(Kt);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed=%.2f rpm', N)\n",
+"disp('For armature current of 30A')\n",
+"Ia=30;\n",
+"T=Ia*Kt;\n",
+"printf('\nTorque=%.2f N-m', T)\n",
+"Eb=Va-Ia*Ra;\n",
+"w=Eb/(Kt);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed=%.2f rpm', N)\n",
+"disp('For armature current of 50A')\n",
+"Ia=50;\n",
+"T=Ia*Kt;\n",
+"printf('\nTorque=%.2f N-m', T)\n",
+"Eb=Va-Ia*Ra;\n",
+"w=Eb/(Kt);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed=%.2f rpm', N)\n",
+"disp('For armature current of 60A')\n",
+"Ia=60;\n",
+"T=Ia*Kt;\n",
+"printf('\nTorque=%.2f N-m', T)\n",
+"Eb=Va-Ia*Ra;\n",
+"w=Eb/(Kt);\n",
+"N=w*60/(2*%pi);\n",
+"printf('\nSpeed=%.2f rpm', N)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.17: Find_the_speed_at_no_load_and_firing_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.17\n",
+"clc;\n",
+"Vm=400*2^0.5;\n",
+"alph=30;\n",
+"Vavg=3*3^0.5*Vm/(2*%pi*3^0.5)*(1+cosd(alph));\n",
+"I=5;\n",
+"R=0.1;\n",
+"Eb=Vavg-I*R;\n",
+"N=Eb/0.3;\n",
+"printf('Speed at no load=%.0f rpm',N)\n",
+"N=1600;\n",
+"Eb=N*0.3;\n",
+"I=50;\n",
+"V=Eb+I*R;\n",
+"alph=acosd(3^0.5*2*%pi*V/(Vm*3*3^0.5)-1)\n",
+"printf('\nFiring angle =%.2f degree',alph)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.18: Find_the_motor_speed.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.18\n",
+"clc;\n",
+"Vdc=2*2^0.5*230/%pi;\n",
+"TL=25;\n",
+"Kt=0.25;\n",
+"Ia=(TL/Kt)^0.5;\n",
+"w=(Vdc-1.5*Ia)/(Kt*Ia);\n",
+"N=w*60/(2*%pi);\n",
+"printf('Motor speed=%.2f rpm',N)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.19: Find_the_load_torque_stator_applied_voltage_and_rotor_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.19;\n",
+"clc;\n",
+"p=4\n",
+"f=50;\n",
+"ns=2*f*60/p;\n",
+"TL_1300=40*(1300/1440)^2;\n",
+"printf('Load torque=%.2f Nm',TL_1300)\n",
+"n=1300;\n",
+"s=(ns-n)/ns;\n",
+"r2s=0.08*2^2; // in book r2'=r2s\n",
+"x2s=0.12*2^2;\n",
+"I2s=(TL_1300*2*%pi*s*25/(3*r2s))^0.5;\n",
+"I2=2*I2s;\n",
+"printf('\nRotor current=%.2f A',I2)\n",
+"r1=0.64;\n",
+"x1=1.1;\n",
+"V1=I2s*((r1+r2s/s)^2+(x1+x2s)^2)^0.5;\n",
+"Vstator=3^0.5*V1;\n",
+"printf('\nStator applied voltage=%.1f V',Vstator)\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: Find_the_value_of_Voltage_which_will_turn_On_the_crowbar.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.1\n",
+"clc;\n",
+"Vzb=14.8;\n",
+"Vt=0.85;\n",
+"V=Vzb+Vt;\n",
+"printf('The value of Voltage which will turn On the crowbar=%.2f V',V)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.20: Find_the_load_torque_stator_applied_voltage_and_rotor_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.20\n",
+"clc;\n",
+"r2s=0.32;\n",
+"r1=0.64;\n",
+"x2s=0.48;\n",
+"x1=1.1;\n",
+"s=r2s/(r1^2+(x1+x2s)^2)^0.5;\n",
+"printf('\nSlip=%.4f ',s)\n",
+"V1=400/3^0.5;\n",
+"Tmax=1.5*V1^2/(2*%pi*25)*(1/(r1+(r1^2+(x1+x2s)^2)^0.5))\n",
+"printf('\nMaximum Torque=%.2f Nm',Tmax)\n",
+"n=25*(1-s);\n",
+"N=n*60;\n",
+"printf('\nSpeed=%.2f rpm',N)\n",
+"disp('at 25 Hz')\n",
+"x1=0.55;\n",
+"x2s=0.24;\n",
+"s=r2s/(r1^2+(x1+x2s)^2)^0.5;\n",
+"printf('\nSlip=%.4f ',s)\n",
+"V1=0.5*400/3^0.5;\n",
+"Tmax=1.5*V1^2/(2*%pi*12.5)*(1/(r1+(r1^2+(x1+x2s)^2)^0.5))\n",
+"printf('\nMaximum Torque=%.2f Nm',Tmax)\n",
+"n=12.5*(1-s);\n",
+"N=n*60;\n",
+"printf('\nSpeed=%.3f rpm',N)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.21: Find_the_starting_torques_at_different_frequencies.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.21\n",
+"clc;\n",
+"r2s=0.32;\n",
+"r1=0.64;\n",
+"x2s=0.48;\n",
+"x1=1.1;\n",
+"\n",
+"V1=400/3^0.5;\n",
+"Tstarting=3*V1^2*r2s/(2*%pi*25)*(1/((r1+r2s)^2+(x1+x2s)^2))\n",
+"printf('\nStarting Torque=%.2f Nm',Tstarting)\n",
+"\n",
+"disp('at 25 Hz')\n",
+"x1=0.55;\n",
+"x2s=0.24;\n",
+"V1=0.5*400/3^0.5;\n",
+"Tstarting=3*V1^2*r2s/(2*%pi*12.5)*(1/((r1+r2s)^2+(x1+x2s)^2))\n",
+"printf('\nStarting Torque=%.2f Nm',Tstarting)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: Find_the_value_of_input_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.2\n",
+"clc;\n",
+"Rth=50*15/(50+15);\n",
+"I=20*10^-3;\n",
+"Vzb=14.8;\n",
+"Vt=0.85;\n",
+"V=Rth*I;// Voltage drop across the thevenin's resistance\n",
+"Vi=V+Vzb+Vt;\n",
+"printf('The value of input voltage Vi=%.3f V',Vi)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: Find_the_value_of_R_and_C.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.3\n",
+"clc;\n",
+"V=200;\n",
+"I=4*10^-3;\n",
+"R=V/I;\n",
+"printf('Resistance=%.0f ohm', R)\n",
+"Vc=0;\n",
+"RL=V/10;\n",
+"tq=15*10^-6;\n",
+"C=tq/(RL *log(2))*10^6;\n",
+"printf('\nCapacitance=%.3f uF', C)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: Find_Duty_cycle_and_Ratio_for_different_output_powers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.4\n",
+"clc;\n",
+"V=230;\n",
+"R=60;\n",
+"Po_max=V^2/R;\n",
+"disp('When power output is 400')\n",
+"Po=400;\n",
+"Duty_cycle=Po/Po_max;\n",
+"printf('Duty cycle=%.4f', Duty_cycle)\n",
+"Ton=0.4537;\n",
+"T=1;\n",
+"Toff=1-Ton;\n",
+"Ratio=Ton/Toff;\n",
+"printf('\nRatio of Ton and Toff when power output is 400=%.4f', Ratio)\n",
+"disp('When power output is 700')\n",
+"Po=700;\n",
+"Duty_cycle=Po/Po_max;\n",
+"printf('Duty cycle=%.4f', Duty_cycle)\n",
+"Ton=0.794;\n",
+"T=1;\n",
+"Toff=1-Ton;\n",
+"Ratio=Ton/Toff;\n",
+"printf('\nRatio of Ton and Toff when power output is 700=%.4f', Ratio)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: Find_RMS_value_of_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// 7.5\n",
+"clc;\n",
+"V=230;\n",
+"Ton=12;\n",
+"Toff=19;\n",
+"Duty_cycle=Ton/(Ton+Toff);\n",
+"printf('Duty cycle=%.4f', Duty_cycle)\n",
+"Vrms_output=V*Duty_cycle^0.5;\n",
+"printf('\nRMS output voltage=%.1f V', Vrms_output)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: Find_the_power_supplied_to_heater_for_different_firing_angles.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.6\n",
+"clc;\n",
+"Vin=230;\n",
+"Vm=2^0.5*Vin;\n",
+"alph=90;\n",
+"R=50;\n",
+"VL=Vm*(1/(2*%pi)*(%pi-90*%pi/180+sind(180)/2))^0.5;\n",
+"Po=VL^2/R;\n",
+"printf('Power supplied when firing angle is 90 degree =%.2f W', Po)\n",
+"alph=120;\n",
+"R=50;\n",
+"VL=Vm*(1/(2*%pi)*(%pi-120*%pi/180+sind(240)/2))^0.5;\n",
+"Po=VL^2/R;\n",
+"printf('\nPower supplied when firing angle is 120 degree =%.2f W', Po)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: Find_the_firing_angles_when_different_powers_are_supplied_to_heater.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.7\n",
+"clc;\n",
+"V=230;\n",
+"R=10;\n",
+"Pmax=V^2/R;\n",
+"P=2645;\n",
+"VL=(P*R)^2;\n",
+"//VL=Vm*(1/(2*%pi)*(%pi-alph*%pi/180+sind(2*alph)/2))^0.5;\n",
+"//on solving\n",
+"alph=90;\n",
+"printf('Firing angle when 2645 W Power is supplied =%.0f degree', alph)\n",
+"P=1587;\n",
+"VL=(P*R)^2;\n",
+"//VL=Vm*(1/(2*%pi)*(%pi-alph*%pi/180+sind(2*alph)/2))^0.5;\n",
+"//on solving\n",
+"alph=108.6;\n",
+"printf('\nFiring angle when 2645 W Power is supplied =%.1f degree', alph)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: Find_the_current_rating_and_peak_inverse_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.8\n",
+"clc;\n",
+"disp('For triac')\n",
+"P=20000;\n",
+"V=400;\n",
+"I=P/(V*3^0.5);\n",
+"printf('Current rating of traic=%.2f A',I)\n",
+"PIV=2^0.5*V;\n",
+"printf('\nPIV of traic=%.2f V',PIV)\n",
+"disp('When two thyristors are connected in antiparallel')\n",
+"I=I/2^0.5; //since each thyristor will conduct for half cycle\n",
+"printf('Current rating =%.2f A',I)\n",
+"PIV=2^0.5*V;\n",
+"printf('\nPIV =%.2f V',PIV)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9: Find_firing_angle_and_power_factor_of_converter_in_the_armature_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//7.9\n",
+"clc;\n",
+"Vm=230*2^0.5;\n",
+"Vf=2*Vm/%pi;\n",
+"Rf=200;\n",
+"If=Vf/Rf;\n",
+"T=50;\n",
+"Kt=0.8;\n",
+"Ia=T/(Kt*If);\n",
+"w=2*%pi*900/60;\n",
+"Vb=Kt*w*If;\n",
+"Ra=0.3;\n",
+"Va=Vb+Ia*Ra;\n",
+"alph_a=acosd(Va*%pi/Vm-1)\n",
+"printf('Firing angle of converter in the armature circuit=%.3f degree',alph_a)\n",
+"Po_a=Va*Ia;\n",
+"Iin=Ia*((%pi-alph_a*%pi/180)/%pi)^0.5;\n",
+"VA_input=Iin*230;\n",
+"pf=Po_a/VA_input;\n",
+"printf('\npower factor of converter in the armature circuit=%.3f lagging',pf)"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/8-Integrated_circuits_and_operational_amplifiers.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/8-Integrated_circuits_and_operational_amplifiers.ipynb
new file mode 100644
index 0000000..431e6f7
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/8-Integrated_circuits_and_operational_amplifiers.ipynb
@@ -0,0 +1,584 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Integrated circuits and operational amplifiers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10: Find_the_slew_rate_distortion_of_the_op_amp_and_amplitude_of_the_input_signal.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.10\n",
+"clc;\n",
+"f=10*10^3;\n",
+"Vp=10;\n",
+"Initial_slope_of_sine_wa=2*%pi*f*Vp*10^-6;\n",
+"printf('Initial slope of sine wave= %.3f V/us', Initial_slope_of_sine_wa)\n",
+"disp('Since slew rate of the amplifier is 0.5V/us, so slew rate distortion will occur')\n",
+"Sr=0.5*10^6;\n",
+"Vp=Sr/(2*%pi*f);\n",
+"printf('Amplitude of the input signal=%.2f V',Vp)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.11: Find_the_different_parameters_of_inverting_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.11\n",
+"clc;\n",
+"Rf=100*10^3;\n",
+"R1=1000;\n",
+"Gain=-Rf/R1;\n",
+"printf('Closed loop gain=%.0f', Gain)\n",
+"Av=100000;\n",
+"Zo=75;\n",
+"f_unity=10^6;\n",
+"beta=R1/(R1+Rf);\n",
+"Z_closed=Zo/(1+Av*beta);\n",
+"printf('\nClosed loop output impedance=%.6f ohm', Z_closed)\n",
+"closed_loop_upper_cut_f=f_unity*beta;\n",
+"printf('\nClosed loop upper cutoff frequency=%.0f Hz', closed_loop_upper_cut_f)\n",
+"closed_loop_input_impe=1000;\n",
+"printf('\nClosed loop input impedance=%.0f ohm', closed_loop_input_impe)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.12: Find_the_different_parameters_of_non_inverting_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.12\n",
+"clc;\n",
+"R2=100*10^3;\n",
+"R1=100;\n",
+"Zin=2*10^6;\n",
+"Zo=75;\n",
+"Gain=(R1+R2)/R1;\n",
+"printf('Closed loop voltage gain=%.0f', Gain)\n",
+"Av=100000;\n",
+"\n",
+"beta=R1/(R1+R2);\n",
+"Z_closed=Zin*(1+Av*beta)*10^-6;\n",
+"printf('\nClosed loop input impedance=%.1f mega-ohm', Z_closed)\n",
+"\n",
+"closed_loop_output_impe=Zo/(1+Av*beta);\n",
+"printf('\nClosed loop output impedance=%.3f ohm', closed_loop_output_impe)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.13: Find_the_different_parameters_of_ac_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.13\n",
+"clc;\n",
+"R1=1000;\n",
+"R2=100000;\n",
+"Avf=(R1+R2)/R1;\n",
+"printf('Closed loop gain=%.0f', Avf)\n",
+"beta=R1/(R1+R2);\n",
+"f_unity=1000000;\n",
+"f2=f_unity*beta;\n",
+"printf('\nUpper cut off frequency=%.0f Hz', f2)\n",
+"disp('Critical frequencies')\n",
+"C1=10^-6;\n",
+"R3=150*10^3;\n",
+"fc=1/(2*%pi*R3*C1);\n",
+"printf('\nCritical frequency when R is 150 Kohm=%.3f Hz', fc)\n",
+"R3=15*10^3;\n",
+"fc=1/(2*%pi*R3*C1);\n",
+"printf('\nCritical frequency when R is 15 Kohm=%.2f Hz', fc)\n",
+"R3=1*10^3;\n",
+"fc=1/(2*%pi*R3*C1);\n",
+"printf('\nCritical frequency when R is 1 Kohm=%.2f Hz', fc)\n",
+"disp('The lower cutt off frequency is the highest of the above three critical frequencies i.e.159.15 Hz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.14: Find_the_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.14\n",
+"clc;\n",
+"Rf=50*10^3;\n",
+"R1=10*10^3;\n",
+"R2=R1;\n",
+"R3=R1;\n",
+"V1=0.5;\n",
+"V2=1.5;\n",
+"V3=0.2;\n",
+"Vo=-Rf*((V1/R1)+(V3/R3)+(V2/R2));\n",
+"printf('Output voltage=%.0f V',Vo)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.17: Find_the_output_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.17\n",
+"clc;\n",
+"R1=50*10^3;\n",
+"R=10*10^3;\n",
+"Vs1=4.5;\n",
+"Vs2=5;\n",
+"Vo=R1/R*(Vs2-Vs1);\n",
+"printf('Output voltage=%.1f V', Vo)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.18: Find_CMRR_in_dB.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.18\n",
+"clc;\n",
+"Vcom=0.5*(2+2);\n",
+"Acom=5*10^-3/Vcom;\n",
+"CMRR=20*log10(50/Acom);\n",
+"printf('CMRR=%.2f dB',CMRR)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1: Find_dc_currents_and_voltages.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.1\n",
+"clc;\n",
+"Vcc=12;\n",
+"Re=3.8*10^3;\n",
+"Rc=4.1*10^3;\n",
+"Ie=(Vcc-0.7)/Re*10^3;\n",
+"printf('Ie=%3f mA',Ie)\n",
+"Ic=0.5*Ie;\n",
+"printf('\nIc=%3f mA',Ic)\n",
+"Vo=Vcc-Ic*Rc*10^-3;\n",
+"printf('\nVo=%1f V',Vo)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.21: Find_the_different_parameters_of_high_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.21\n",
+"clc;\n",
+"R2=5.6*10^3;\n",
+"R1=1*10^3;\n",
+"Avf=1+R2/R1;\n",
+"printf('Mid band Gain=%.2f', Avf)\n",
+"Vin=1.6;\n",
+"Vo=Avf*Vin;\n",
+"printf('\nOutput voltage=%.3f mV', Vo)\n",
+"R=1000;\n",
+"C=0.001*10^-6;\n",
+"fc=1/(2*%pi*R*C);\n",
+"printf('\nCutt off frequency=%.2f Hz', fc)\n",
+"Gain=0.707*Avf;\n",
+"printf('\nGain=%.3f', Gain)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.22: Find_the_different_parameters_of_low_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.22\n",
+"clc;\n",
+"R2=5.6*10^3;\n",
+"R1=10*10^3;\n",
+"Avf=1+R2/R1;\n",
+"printf('Mid band Gain=%.2f', Avf)\n",
+"Vin=1.1;\n",
+"Vo=Avf*Vin;\n",
+"printf('\nOutput voltage=%.3f mV', Vo)\n",
+"R=10000;\n",
+"C=0.001*10^-6;\n",
+"fc=1/(2*%pi*R*C);\n",
+"printf('\nCutt off frequency=%.2f Hz', fc)\n",
+"Vo=0.707*Avf;\n",
+"printf('\nOutput voltage=%.3f mV', Vo)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2: Calculate_the_different_parameters_of_differential_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.2\n",
+"clc;\n",
+"Vcc=12;\n",
+"Re=1*10^6;\n",
+"Rc=1*10^6;\n",
+"Ie=(Vcc-0.7)/Re*10^3;\n",
+"re=25*2/Ie;\n",
+"printf('re=%.0f ohm',re)\n",
+"Vgd=Rc/(2*re);\n",
+"printf('\nVoltage gain for the differential input=%.1f ',Vgd)\n",
+"Vi=2.1*10^-3;\n",
+"Vo_Ac=Vgd*Vi;\n",
+"printf('\nAC output voltage=%.4f V',Vo_Ac)\n",
+"Beta=75;\n",
+"Zi=2*Beta*re;\n",
+"printf('\nInput impedance=%.0f ohm',Zi)\n",
+"Rc=1*10^6;\n",
+"RE=10^6;\n",
+"CMG=Rc/(re+2*RE);\n",
+"printf('\nCommon mode gain=%.3f ',CMG)\n",
+"CMRR=Vgd/CMG;\n",
+"printf('\nCommon mode rejection ratio=%.2f ',CMRR)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3: Find_the_closed_loop_gain_output_and_error_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.3\n",
+"clc;\n",
+"open_loop_gain=100000;\n",
+"FF=0.01;\n",
+"Closed_loop_gain=open_loop_gain/(1+open_loop_gain*FF);\n",
+"printf('Closed loop gain=%.1f',Closed_loop_gain)\n",
+"Vi=2*10^-3;\n",
+"output=Vi*Closed_loop_gain;\n",
+"printf('\nOutput=%.4f V',output)\n",
+"Error_voltage=output/open_loop_gain*10^6;\n",
+"printf('\nError voltage=%.3f uV',Error_voltage)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4: Find_the_closed_loop_gain_output_and_error_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.4\n",
+"clc;\n",
+"open_loop_gain=15000;\n",
+"FF=0.01;\n",
+"Closed_loop_gain=open_loop_gain/(1+open_loop_gain*FF);\n",
+"printf('Closed loop gain=%.3f',Closed_loop_gain)\n",
+"Vi=2*10^-3;\n",
+"output=Vi*Closed_loop_gain;\n",
+"printf('\nOutput=%.4f V',output)\n",
+"Error_voltage=output/open_loop_gain*10^6;\n",
+"printf('\nError voltage=%.3f uV',Error_voltage)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5: Find_the_input_and_output_impedances.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.5\n",
+"clc;\n",
+"Av=100000;\n",
+"beta=0.01;\n",
+"Zi=2*10^6;\n",
+"Closed_loop_input_imped=Zi*(1+Av*beta)*10^-6;\n",
+"printf('Closed loop input impedance=%.0f Mega-ohm',Closed_loop_input_imped)\n",
+"Zo=75;\n",
+"Closed_loop_output_imped=Zo/(1+Av*beta);\n",
+"printf('\nClosed loop output impedance=%.4f ohm',Closed_loop_output_imped)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6: Find_closed_loop_gain_and_desensitivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.6\n",
+"clc;\n",
+"Av=100000;\n",
+"beta=0.001;\n",
+"Closed_loop_gain=Av/(1+Av*beta);\n",
+"printf('\nClosed loop gain=%.1f ',Closed_loop_gain)\n",
+"Desensitivity=(1+Av*beta);\n",
+"printf('\nDesensitivity=%.0f',Desensitivity)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7: Find_the_closed_loop_gain_and_upper_cut_off_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.7\n",
+"clc;\n",
+"f_unity=10^6;\n",
+"Av=100000;\n",
+"open_loop_upper_cutoff_f=f_unity/Av;\n",
+"printf('open loop upper cutoff frequency=%.0f Hz', open_loop_upper_cutoff_f)\n",
+"disp('when beta=0.001')\n",
+"beta=0.001;\n",
+"Closed_loop_gain=Av/(1+Av*beta);\n",
+"printf('\nClosed loop gain=%.1f ',Closed_loop_gain)\n",
+"upper_cutoff_frequency=f_unity/Closed_loop_gain;\n",
+"printf('\nUpper cutoff frequency=%.0f Hz', upper_cutoff_frequency)\n",
+"disp('when beta=0.01')\n",
+"beta=0.01;\n",
+"Closed_loop_gain=Av/(1+Av*beta);\n",
+"printf('\nClosed loop gain=%.1f ',Closed_loop_gain)\n",
+"upper_cutoff_frequency=f_unity/Closed_loop_gain;\n",
+"printf('\nUpper cutoff frequency=%.0f Hz', upper_cutoff_frequency)\n",
+"disp('when beta=0.1')\n",
+"beta=0.1;\n",
+"Closed_loop_gain=Av/(1+Av*beta);\n",
+"printf('\nClosed loop gain=%.3f ',Closed_loop_gain)\n",
+"upper_cutoff_frequency=f_unity/Closed_loop_gain;\n",
+"printf('\nUpper cutoff frequency=%.0f Hz', upper_cutoff_frequency)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8: Find_the_slew_rate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.8\n",
+"clc;\n",
+"Imax=10*10^-6;\n",
+"C=4000*10^-12;\n",
+"Slew_rate=Imax/C;\n",
+"printf('Slew rate=%.0f V/s', Slew_rate)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.9: Find_the_slew_rate_distortion_of_the_op_amp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//8.9\n",
+"clc;\n",
+"f=10*10^3;\n",
+"Vp=6\n",
+"Initial_slope_of_sine_wa=2*%pi*f*Vp*10^-6;\n",
+"printf('Initial slope of sine wave= %.5f V/us', Initial_slope_of_sine_wa)\n",
+"disp('Since slew rate of the amplifier is 0.4V/us, there is no slew rate distortion')"
+ ]
+ }
+],
+"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
+}
diff --git a/Power_Electronics_by_B_R_Gupta_And_V_Singhal/9-Number_systems.ipynb b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/9-Number_systems.ipynb
new file mode 100644
index 0000000..a7b0b4c
--- /dev/null
+++ b/Power_Electronics_by_B_R_Gupta_And_V_Singhal/9-Number_systems.ipynb
@@ -0,0 +1,664 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Number systems"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10: Calculate_addition_and_subtraction_of_the_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.10\n",
+"clc;\n",
+"c=24;\n",
+"xc= bitcmp (c ,8);\n",
+"A=xc+1;\n",
+"B=16;\n",
+"Ans=A+B;\n",
+"a=dec2bin(Ans)\n",
+"disp(a)\n",
+"disp('Since the MSB is 1 so the number is negative and equal to -8')\n",
+"\n",
+"Ans=A-B;\n",
+"a=dec2bin(Ans)\n",
+"disp(a)\n",
+"disp('Since the MSB is 1 so the number is negative and equal to -40')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11: Calculate_addition_and_subtraction_of_the_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.11\n",
+"clc;\n",
+"c=60;\n",
+"xc= bitcmp (c ,8);\n",
+"A=xc+1;\n",
+"d=28;\n",
+"xd= bitcmp (d ,8);\n",
+"B=xd+1;\n",
+"Ans=B+A;\n",
+"a=dec2bin(Ans)\n",
+"disp(a)\n",
+"disp('Since the MSB is 1 so the number is negative and equal to -88')\n",
+"Ans=B-A;\n",
+"a=dec2bin(Ans,8)\n",
+"disp(a)\n",
+"disp('Since the MSB is 0 so the number is positive and equal to +32')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.12: Convert_decimal_number_into_equivalent_binary_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// 9.12\n",
+"clc;\n",
+"q =0;\n",
+"b =0;\n",
+"s =0;\n",
+"a =0.6875; // accepting the decimal input from user \n",
+"d = modulo (a ,1) ;\n",
+"a = floor ( a ) ;\n",
+"while (a >0)\n",
+"x = modulo (a ,2) ;\n",
+"b = b + (10^ q ) * x ;\n",
+" a = a /2;\n",
+" a = floor ( a ) ;\n",
+" q = q +1;\n",
+" end\n",
+" for i =1:10\n",
+" // for fractional part\n",
+"d = d *2;\n",
+" q = floor ( d ) ;\n",
+" s = s + q /(10^ i ) ;\n",
+" if d >=1 then\n",
+" d =d -1;\n",
+" end\n",
+"end\n",
+"m=b+s;\n",
+"printf('Equivalent binary number=%.4f',m)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.13: Convert_decimal_number_into_equivalent_binary_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// 9.13\n",
+"clc;\n",
+"q =0;\n",
+"b =0;\n",
+"s =0;\n",
+"a =0.634; // accepting the decimal input from user \n",
+"d = modulo (a ,1) ;\n",
+"a = floor ( a ) ;\n",
+"while (a >0)\n",
+"x = modulo (a ,2) ;\n",
+"b = b + (10^ q ) * x ;\n",
+" a = a /2;\n",
+" a = floor ( a ) ;\n",
+" q = q +1;\n",
+" end\n",
+" for i =1:10\n",
+" // for fractional part\n",
+"d = d *2;\n",
+" q = floor ( d ) ;\n",
+" s = s + q /(10^ i ) ;\n",
+" if d >=1 then\n",
+" d =d -1;\n",
+" end\n",
+"end\n",
+"m=b+s;\n",
+"printf('Equivalent binary number=%.7f',m)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.14: Convert_decimal_number_into_equivalent_binary_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// 9.14\n",
+"clc;\n",
+"clear;\n",
+"q =0;\n",
+"b =0;\n",
+"s =0;\n",
+"a =39.12; // accepting the decimal input from user \n",
+"d = modulo (a ,1) ;\n",
+"a = floor ( a ) ;\n",
+"while (a >0)\n",
+"x = modulo (a ,2) ;\n",
+"b = b + (10^ q ) * x ;\n",
+" a = a /2;\n",
+" a = floor ( a ) ;\n",
+" q = q +1;\n",
+" end\n",
+" for i =1:10\n",
+" // for fractional part\n",
+"d = d *2;\n",
+" q = floor ( d ) ;\n",
+" s = s + q /(10^ i ) ;\n",
+" if d >=1 then\n",
+" d =d -1;\n",
+" end\n",
+"end\n",
+"m=b+s;\n",
+"printf('Equivalent binary number=%.7f',m)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.15: Find_the_addition_of_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.15\n",
+"clc;\n",
+"a='1011010101';\n",
+"d=bin2dec(a);\n",
+"c='100011010';\n",
+"b=bin2dec(c);\n",
+"e=d+b;\n",
+"f=dec2bin(e);\n",
+"disp('addition of binary numbers =')\n",
+"disp(f)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.16: Convert_binary_number_into_equivalent_decimal_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.16\n",
+"clc;\n",
+"p =1;\n",
+" q =1;\n",
+" z =0;\n",
+" b =0;\n",
+" w =0;\n",
+" f =0;\n",
+"bin =11001.001011; // binary input\n",
+"d = modulo (bin ,1) ;\n",
+"d= d *10^10;\n",
+" a = floor ( bin ) ;\n",
+" while (a >0)\n",
+" r = modulo (a ,10) ;\n",
+" b(1,q) = r ;\n",
+" a=a /10;\n",
+" a= floor ( a ) ;\n",
+" q = q +1;\n",
+" end\n",
+" for m =1: q -1\n",
+" c=m -1;\n",
+" f=f+b(1,m) *(2^ c);\n",
+" end\n",
+" while (d >0)\n",
+" e = modulo (d ,2)\n",
+" w (1 , p ) = e\n",
+" d = d /10;\n",
+" d = floor ( d )\n",
+" p = p +1;\n",
+" end\n",
+" for n =1: p -1\n",
+" z = z + w (1 , n ) *(0.5) ^(11 - n ) ;\n",
+" end\n",
+" z = z *10000;\n",
+" z = round ( z ) ;\n",
+" z = z /10000;\n",
+" x=f+z;\n",
+" printf('Equivalent decimal number=%.6f',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.17: Convert_hexadecimal_number_into_equivalent_decimal_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.17\n",
+"clc;\n",
+"a='8A3';\n",
+"disp('The decimal no. is')\n",
+"x=hex2dec(a);\n",
+"disp('',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.18: Convert_decimal_number_into_equivalent_hexadecimal_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.18\n",
+"clc;\n",
+"a=268;\n",
+"disp('The hexa decimal no. is')\n",
+"x=dec2hex(a);\n",
+"disp('',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.19: Convert_decimal_number_into_equivalent_hexadecimal_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.19\n",
+"clc;\n",
+"a=5741;\n",
+"disp('The hexa decimal no. is')\n",
+"x=dec2hex(a);\n",
+"disp('',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1: Convert_decimal_number_into_equivalent_binary_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.1\n",
+"clc;\n",
+"x=10;\n",
+"disp('The binary number is')\n",
+"a=dec2bin(x);\n",
+"disp('',a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.20: Convert_hexadecimal_number_into_equivalent_decimal_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.20\n",
+"clc;\n",
+"a='D70';\n",
+"disp('The decimal no. is')\n",
+"x=hex2dec(a);\n",
+"disp('',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2: Convert_decimal_number_into_equivalent_binary_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.2\n",
+"clc;\n",
+"x=25;\n",
+"disp('The binary number is')\n",
+"a=dec2bin(x);\n",
+"disp('',a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.3: Convert_binary_number_into_equivalent_decimal_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.3\n",
+"clc;\n",
+"a='101110';\n",
+"disp('The decimal no. is')\n",
+"x=bin2dec(a);\n",
+"disp('',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4: Convert_decimal_number_into_equivalent_binary_number.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.4\n",
+"clc;\n",
+"x=15;\n",
+"disp('The binary number of decimal 15 is')\n",
+"a=dec2bin(x);\n",
+"disp('',a)\n",
+"x=31;\n",
+"disp('The binary number of decimal 31 is')\n",
+"a=dec2bin(x);\n",
+"disp('',a)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5: Calculate_the_subtraction_of_two_binary_numbers.sci"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.5\n",
+"clc;\n",
+"a='11001';\n",
+"b=bin2dec(a);\n",
+"c='10001';\n",
+"f=bin2dec(c);\n",
+"d=b-f;\n",
+"s=dec2bin(d);\n",
+"disp('Subtraction of two binary numbers=')\n",
+"disp(s)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6: Calculate_the_subtraction_of_two_binary_numbers.sci"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.6\n",
+"clc;\n",
+"a='1010';\n",
+"b=bin2dec(a);\n",
+"c='0111';\n",
+"f=bin2dec(c);\n",
+"d=b-f;\n",
+"s=dec2bin(d);\n",
+"disp('Subtraction of two binary numbers=')\n",
+"disp(s)\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7: Express_the_decimals_in_16_bit_signed_binary_system.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.7\n",
+"clc;\n",
+"a=8;\n",
+"b=dec2bin(a);\n",
+"disp(b)\n",
+"disp('The 16 bit signed binary number of +8=0000 0000 0000 1000')\n",
+"disp('The 16 bit signed binary number of -8=1000 0000 0000 1000')\n",
+"a=165;\n",
+"b=dec2bin(a);\n",
+"disp(b)\n",
+"disp('The 16 bit signed binary number of +165=0000 0000 1010 0101')\n",
+"disp('The 16 bit signed binary number of -165=1000 0000 1010 0101')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8: Calculate_the_twos_complement_representation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.8\n",
+"clc;\n",
+"a='0001 1111';\n",
+"disp(a)\n",
+"disp('Since the MSB is 0 so this is a positive number and its 2 s complement representation is')\n",
+"b=bin2dec(a);\n",
+"disp(b)\n",
+"a='1110 0101';\n",
+"disp(a)\n",
+"disp('Since the MSB is 1 so this is a negative number and its 2 s complement representation is')\n",
+"c=bin2dec(a);\n",
+"xc= bitcmp (c ,8);\n",
+"b=xc+1;\n",
+"disp(b)\n",
+"a='1111 0111';\n",
+"disp(a)\n",
+"disp('Since the MSB is 1 so this is a negative number and its 2 s complement representation is')\n",
+"c=bin2dec(a);\n",
+"xc= bitcmp (c ,8);\n",
+"b=xc+1;\n",
+"disp(b)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.9: Find_the_largest_positive_and_negative_number_for_8_bits.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//9.9\n",
+"clc;\n",
+"disp('The largest 8 bit positive number is +127 and is represented in binary as')\n",
+"a='0111 1111';\n",
+"disp(a)\n",
+"disp('The largest 8 bit negative number is -128 and is represented in binary as')\n",
+"a='1000 0000';\n",
+"disp(a)"
+ ]
+ }
+],
+"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
+}