{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 1: Electrical Fundamentals" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.10: Express_the_voltage_in_millivolt_using_exp_notation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa:1.10\n", "clc;\n", "clear;\n", "close;\n", "vg_v=3.75*10^-6;//given\n", "vg_mv=vg_v*1000;\n", "printf('%f volt voltage is %e mV',vg_v,vg_mv);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.11: Calculate_the_voltage_dropped_across_33kohm_with_3mA_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.11\n", "clc;\n", "clear;\n", "close;\n", "r=33000;//in ohms\n", "i=0.003;//in amp\n", "v=i*r;\n", "printf('Voltage dropped = %d volts',v);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.12: Calculate_the_charge_transferred_in_20ms_by_45_microamp_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.12\n", "clc;\n", "clear;\n", "close;\n", "t=20*10^-3;//in sec\n", "i=45*10^-6;//in amp\n", "q=i*t*10^9;\n", "printf('Charge transferred = %f nC',q);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.13: EX1_13.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.13\n", "clc;\n", "clear;\n", "close;\n", "p=0.3;//in watts\n", "v=1500;//in volts\n", "i=(p/v)*10^6;\n", "printf('Current supplied = %d microamp',i);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.14: Calculate_the_current_through_resistor_12ohm_with_6V_battery.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.14\n", "clc;\n", "clear;\n", "close;\n", "r=12;//in ohms\n", "v=6;//in volts\n", "i=(v/r);\n", "printf('Current = %f Amp',i);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.15: Calculate_the_voltage_developed_across_56ohm_with_100mA_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.15\n", "clc;\n", "clear;\n", "close;\n", "r=56;//in ohms\n", "i=0.1;//in amp\n", "v=i*r;\n", "printf('Voltage dropped = %f volts',v);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.16: Calculate_the_resistance_with_15_volt_applied_with_1mA_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.16\n", "clc;\n", "clear;\n", "close;\n", "v=15;//in volts\n", "i=0.001;//in amp\n", "r=v/i;\n", "printf('Resistance = %d ohms',r);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.17: Calculate_the_resistance_of_8m_length_cooper_wire.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.17\n", "clc;\n", "clear;\n", "close;\n", "p=1.724*10^-8;//in ohm-meter\n", "l=8;//in meters\n", "a=1*10^-6;//in sq. meter\n", "r=(p*l)/a;\n", "printf('Resistance = %f ohms',r);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.18: Calculate_the_voltage_drop_between_the_ends_of_the_20m_wire_carring_5A_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.18\n", "clc;\n", "clear;\n", "close;\n", "p=1.724*10^-8;//in ohm-meter\n", "l=20;//in meters\n", "a=1*10^-6;//in sq. meter\n", "i=5;//in amperes\n", "r=(p*l)/a;\n", "v=i*r;\n", "printf('Voltage dropped = %f volts',v);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.19: Calculate_the_power_supplied_by_3_V_battery.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.19\n", "clc;\n", "clear;\n", "close;\n", "v=3;//in volts\n", "i=1.5;//in amperes\n", "p=v*i;\n", "printf('Power supplied = %f watts',p);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.20: Calculate_the_power_dissipated_in_100ohm_with_4V_drop.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.20\n", "clc;\n", "clear;\n", "close;\n", "v=4;//in volts\n", "r=100;//in ohms\n", "p=(v^2)/r;\n", "printf('Power dissipated = %f watts',p);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.21: Calculate_the_power_dissipated_in_100ohm_with_4V_drop.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.21\n", "clc;\n", "clear;\n", "close;\n", "i=20*10^-3;//in amps\n", "r=1000;//in ohms\n", "p=(i^2)*r;\n", "printf('Power dissipated = %f watts',p);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.22: EX1_22.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.22\n", "clc;\n", "clear;\n", "close;\n", "v=600;//in volts\n", "d=25*10^-3;//in meters\n", "E=(v)/d;\n", "printf('Electric Field Strength = %d kV/m',E/1000);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.23: Calculate_the_flux_density_at_50mm_from_st_wire_carrying_20A.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.23\n", "clc;\n", "clear;\n", "close;\n", "u=4*%pi*10^-7;//in H/m\n", "i=20;//in amps\n", "d=50*10^-3;//in meters\n", "B=(u*i)/(2*%pi*d);\n", "printf('Flux Density = %e Tesla',B);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.24: Calculate_the_total_flux_by_flux_density.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.24\n", "clc;\n", "clear;\n", "close;\n", "B=(2.5*10^-3);//in Tesla\n", "a=(20*10^-4);//in sq. meter\n", "flux=B*a;\n", "printf('Flux = %e webers',flux);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.25: Calculate_the_relative_permitivity_of_steel_at_different_given_flux_density.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.25\n", "clc;\n", "clear;\n", "close;\n", "B1=0.6;//in Tesla\n", "u1=B1/800;\n", "u_r1=u1/(4*%pi*10^-7);\n", "printf('reltive permitivity at 0.6T = %f',u_r1);\n", "B2=1.6;//in Tesla\n", "u2=0.2/4000;\n", "u_r2=u2 /(4*%pi*10^-7);\n", "printf('\n reltive permitivity at 1.6T = %f',u_r2);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.26: Calculate_the_current_to_establish_given_flux.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Ex:1.26\n", "clc;\n", "clear;\n", "close;\n", "flux=0.8*10^-3;\n", "a=(500*10^-6);//in sq. meter\n", "l=0.6;//in meter\n", "N=800;\n", "B=flux/a;\n", "printf('Flux Density = %e Tesla',B);\n", "H=3500;//in A/m\n", "i=(H*l)/N;\n", "printf('\n Current required = %f amp.s',i);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.4: Express_angle_of_215_degree_in_radians.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa:1.4\n", "clc;\n", "clear;\n", "close;\n", "ang_d=215;//given\n", "ang_r=ang_d*%pi/180;\n", "printf('%f degree angle is %f radians',ang_d,ang_r);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.5: Express_angle_in_degrees.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa:1.5\n", "clc;\n", "clear;\n", "close;\n", "ang_r=2.5;//given\n", "ang_d=2.5*180/%pi;//angle in degrees\n", "printf('%f radians angle is %f degrees',ang_r,ang_d);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.6: Calculate_the_current_in_milliamp.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa:1.6\n", "clc;\n", "clear;\n", "close;\n", "i_amp=0.075;//given\n", "i_milamp=i_amp*1000;//current in milliamp.\n", "printf('%f amp current is %f mA',i_amp,i_milamp);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.7: Express_the_freq_in_Mhz_of_1495_kHz_radio_transmitter.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa:1.7\n", "clc;\n", "clear;\n", "close;\n", "fq_khz=1495;//given\n", "fq_Mhz=fq_khz/1000;\n", "printf('%f kHz frequency is %f MHz',fq_khz,fq_Mhz);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.8: Express_the_capacitance_in_microfarad_of_27000_pF.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa:1.8\n", "clc;\n", "clear;\n", "close;\n", "c_pF=27000;//given\n", "c_uF=c_pF/1000;\n", "printf('%f picofarad capacitance is %f microfarad',c_pF,c_uF);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.9: Express_current_in_amp.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Exa:1.9\n", "clc;\n", "clear;\n", "close;\n", "c_mA=7.25;//given\n", "c_A=c_mA*1000;\n", "printf('%f milliampere current is %f ampere',c_mA,c_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 }