summaryrefslogtreecommitdiff
path: root/Linear_Control_Systems_by_B_S_Manke/5-MODELLING_A_CONTROL_SYSTEM.ipynb
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Linear_Control_Systems_by_B_S_Manke/5-MODELLING_A_CONTROL_SYSTEM.ipynb
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Linear_Control_Systems_by_B_S_Manke/5-MODELLING_A_CONTROL_SYSTEM.ipynb')
-rw-r--r--Linear_Control_Systems_by_B_S_Manke/5-MODELLING_A_CONTROL_SYSTEM.ipynb421
1 files changed, 421 insertions, 0 deletions
diff --git a/Linear_Control_Systems_by_B_S_Manke/5-MODELLING_A_CONTROL_SYSTEM.ipynb b/Linear_Control_Systems_by_B_S_Manke/5-MODELLING_A_CONTROL_SYSTEM.ipynb
new file mode 100644
index 0000000..4310824
--- /dev/null
+++ b/Linear_Control_Systems_by_B_S_Manke/5-MODELLING_A_CONTROL_SYSTEM.ipynb
@@ -0,0 +1,421 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: MODELLING A CONTROL SYSTEM"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_10: Overall_Transfer_Function_of_given_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:overall_transfer_function_of_given_system\n",
+"//example 5.9.10\n",
+"//page 108\n",
+"syms Ra Kt Jm fm Kb\n",
+"//where Ra=armature_resistance; Kt=motor_torque_const; Jm=moment_of_inertia; fm=coeff_of_viscous_friction; Kb=motor_back_emf_const\n",
+"s=%s;\n",
+"a=Kt/(s*Ra*(s*Jm+fm));\n",
+"a=simple(a);\n",
+"b=s*Kb;\n",
+"c=a/(1+a*b);\n",
+"c=simple(c);\n",
+"disp(c,'Q(s)/V(s)=');//overall_transfer_function\n",
+"Kt=0.183;Kb=0.183;Ra=4.8;Jm=.004;fm=0.0015;\n",
+"a=Kt/(s*Ra*(s*Jm+fm));\n",
+"b=s*Kb;\n",
+"c=a/(1+a*b);\n",
+"disp(c,'Q(s)/V(s)=');//overall_transfer_function_after substituting value in above equation"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_11: Overall_Transfer_Function_of_given_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:overall_transfer_function_of_positional_control_system\n",
+"//example 5.9.11\n",
+"//page 109\n",
+"syms Ka Ke Kb Kt Jeq feq Ra N1 N2\n",
+"//where Ka=amplifier_gain; Ke=error_detector_gain; Kb=motor_back_emf_const; Kt=motor_torque_const; Ra=armature_resistance; Jeq=moment_of_inertia; feq=coeff_of_viscous_friction; \n",
+"s=%s;\n",
+"Kt=.0001;Ra=0.2;Jeq=.0001;feq=.0005;Ka=10;Ke=2;Kb=0.0001;f=0.1;\n",
+"a=(Ka*Ke); // in series\n",
+"b=Kt/(s*Ra*(Jeq*s+feq));\n",
+"c=b/(1+b*s*Kb);\n",
+"d=(a*c); // in series\n",
+"f=0.1;\n",
+"g=(d*f); // in series\n",
+"h=g/(1+g);\n",
+"disp(h,'C(s)/R(s)=');//overall_transfer_function_after substituting value in above equation"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_12: Overall_Transfer_Function_of_given_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:overall_transfer_function_of_given_system\n",
+"//example 5.9.12\n",
+"//page 111\n",
+"syms Ka Ke Kf Rf Lf Jeq feq N1 N2\n",
+"//where Ka=amplifier_gain; Ke=error_detector_gain; Kf=motor_torque_const; Rf=field_resistance; Lf=field_inductance Jeq=moment_of_inertia; feq=coeff_of_viscous_friction;\n",
+"s=%s;\n",
+"d=N1/N2;\n",
+"Ka=10; Ke=8; Kf=0.05; Rf=5; Lf=0.25; Jeq=0.05; feq=0.075; d=0.1;\n",
+"a=(Ka*Ke);\n",
+"b=Kf/(Rf+s*Lf);\n",
+"c=1/(s*(Jeq*s+feq));\n",
+"g=(b*c) //in series\n",
+"h=(g*a) //in series\n",
+"i=(h*d) //in series\n",
+"j=i/(1+i);\n",
+"disp(j,'C(s)/R(s)=');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_13: Overall_Transfer_Function_of_Two_Phase_ac_Motor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:overall_transfer_function_of_two_phase_ac_motor\n",
+"//example 5.9.13\n",
+"//page 113\n",
+"syms Ka K Ktg Jeq feq N1 N2 m\n",
+"//where Ka=amplifier_gain; Ktg=tachometer_gain_const Jeq=moment_of_inertia; feq=coeff_of_viscous_friction; \n",
+"s=%s;\n",
+"//from torque characterstics m and K are determined \n",
+"Ka=20; K=0.0012; Ktg=0.2; Jeq=0.00015; feq=0.0001;m=-0.0003;\n",
+"a=K/(Jeq*s+(feq-m));\n",
+"b=N1/N2;\n",
+"b=0.1;\n",
+"c=(Ka*a) // in series\n",
+"d=(c*b) // in series\n",
+"e=d/(1+Ktg*d);\n",
+"disp(e,'C(s)/R(s)=');//overall_transfer_function"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_14: Transfer_Function_Of_Motor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:transfer_function_of_motor\n",
+"//example 5.9.14\n",
+"//page 114\n",
+"syms Kt Kb Ra La J \n",
+"//where Ka=amplifier_gain; Kt=motor_torque_const; Ra=armature_resistance; La=armature_inductor; J=moment_of_inertia \n",
+"s=%s;\n",
+"//since there are two inputs Va(s)and Tl(s).If Va(s) is held at fixed value then only effect of Tl(s) is considered and Va(s)is taken as Zero.\n",
+"a=(Kt*Kb)/(Ra+s*La)\n",
+"b=1/J*s\n",
+"c=b/(1+b*a);\n",
+"disp(-c,'Wm(s)/Tl(s)=');//negative sign indicates that an increase in Tl decreases Wm\n",
+"Kb=9.55;Kt=9.55;Ra=0.75;La=0.005;J=50;\n",
+"a=(Kt*Kb)/(Ra+s*La)\n",
+"b=1/(J)*(1/(s))\n",
+"c=b/(1+b*a);\n",
+"disp(-c,'Wm(s)/Tl(s)=');//after putting values"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_4: Calculate_Reference_Voltage_Vr.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:calculate_reference_voltage_Vr\n",
+"//example 5.9.4\n",
+"//page 102\n",
+"exec series.sce;\n",
+"A=2//amplifier\n",
+"K=10//motor_field\n",
+"N=100//speed\n",
+"tg=0.1//tacho_generator\n",
+"a=series(A,K);\n",
+"b=a/.tg;\n",
+"disp(b,'N/Vr=');\n",
+"//since N=100\n",
+"Vr=N*(1/b);\n",
+"disp(Vr,'reference_voltage=');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_5: Calculate_Reference_Voltage_Vr.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:calculate_reference_voltage_Vr\n",
+"//example 5.9.5\n",
+"//page 102\n",
+"exec series.sce;\n",
+"Vt=250//output_voltage\n",
+"Rf=100//field_winding_resistance\n",
+"Kg=500//generator_constant\n",
+"A=2//amplifier\n",
+"Vf=0.4//fraction_of_output_voltage_compared_with_reference_voltage\n",
+"a=1/Rf;\n",
+"b=series(A,a);\n",
+"c=series(b,Kg);\n",
+"d=c/.Vf;\n",
+"disp(d,'Vt/Vr=');\n",
+"//since Vt=250\n",
+"Vr=Vt*(1/d);\n",
+"disp(Vr,'reference_voltage=');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_6: Calculate_Gain_of_Amplifier_Ka.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:calculate_gain_of_amplifier_Ka\n",
+"//example 5.9.6\n",
+"//page 103\n",
+"//steady state equations: Ei=Vt+Il*Ra and Vt=Il*Rl\n",
+"//where Vt=output_voltage, Rl=load_resistance, Ra=armature_resistance, Il=load_current, \n",
+"syms Rl Ra Ka Er e;\n",
+"Ei=450;\n",
+"If=1.5;//field current\n",
+"Kg=Ei/If;//generator_emf_constant\n",
+"Vt=400;\n",
+"//from stedy state eq. we get : Vt/Ei=Rl/(Rl+Ra)\n",
+"a=Rl/(Rl+Ra);\n",
+"a=Vt/Ei;\n",
+"c=(Kg*a);\n",
+"G=(Ka*c);\n",
+"H=0.1;\n",
+"//transfer function relating erroe 'e' and the reference voltage 'Er' is e/Er=1/(1+GH)\n",
+"b=e/Er;\n",
+"b=1/(1+G*H);\n",
+"e=Vt*H*.02 ;//since allowable error is 2% \n",
+"Er=(Vt*H)+e;\n",
+"//since e/Er=1/(1+G*H), on putting value of e,Er,G and H and solving we get\n",
+"Ka=1.89;\n",
+"disp(Ka,'gain_of_amplifier_Ka=');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_7: Transfer_Function_of_Generator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:transfer_function_of_generator\n",
+"//example 5.9.7\n",
+"//page 105\n",
+"syms E Vf Kg R L\n",
+"s=%s;\n",
+"//generator_field_constant_Kg=delta(e)/delta(If)\n",
+"Kg=50/2;\n",
+"L=2;//field_inductance\n",
+"R=200;//field_resistance\n",
+"//transfer function is given by : E/Vf=(Kg/R+s*L)\n",
+"a=Kg/(R+s*L);\n",
+"disp(a,'E(s)/Vf(s)=');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_8: Overall_Transfer_Function_of_given_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:overall_transfer_function_of_given_system\n",
+"//example 5.9.8\n",
+"//page 105\n",
+"syms Rf Ra Kb Jm Lf La Kg Kt Jl s\n",
+"Rf=1000;//field_resistance\n",
+"Lf=100;//field_inductanc\n",
+"Kg=1000;//generator_field_constant\n",
+"Ra=20;//armature_resistance\n",
+"La=0.1;//armature_inductance\n",
+"Kt=1.2;//motor_torque_const\n",
+"Kb=1.2;//motor_back_emf_const\n",
+"Jl=0.00003;//moment_of_inertia\n",
+"Jm=0.00002;//coeff_of_viscous_friction\n",
+"a=Kt/(Ra+s*La);\n",
+"b=1/((Jm+Jl)*s);\n",
+"c=(a*b);\n",
+"d=c/(1+c*Kb);\n",
+"e=Kg/(Rf+s*Lf);\n",
+"f=(d*e);\n",
+"f=simple(f)\n",
+"disp(f,'wss(s)/Vf(s)=');\n",
+"\n",
+"//steady state value\n",
+"disp('under steady state condition, on putting s=0 in expression f,we get:')\n",
+"disp('Vf=1.2*wss')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9_9: Overall_Transfer_Function_of_given_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Caption:overall_transfer_function_of_given_system\n",
+"//example 5.9.9\n",
+"//page 107\n",
+"syms Ka Ke Kt J f N1 N2\n",
+"s=%s;\n",
+"Ke=10;//error_detector_gain\n",
+"Ka=100;//amplifier_transconductance\n",
+"Kt=.0005;//motor_torque_const\n",
+"J=.0000125;//moment_of_inertia\n",
+"f=.0005;//coeff_of_viscous_friction\n",
+"g=N1/N2;\n",
+"g=1/20;\n",
+"a=(Ka*Ke);\n",
+"b=(a*Kt);\n",
+"c=1/(J*s^2+f*s);\n",
+"d=(c*b);\n",
+"e=(g*d);\n",
+"h=e/(1+e);\n",
+"disp(h,'C(s)/R(s)=');//result"
+ ]
+ }
+],
+"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
+}