Pankaj(ADS)

Featured post

Python Codes for Electric Potential

Python Codes for Electric Potential Code:- import numpy as np import math import matplotlib.pyplot as plot ''' Calculating Elect...

Thursday 2 July 2020

Python Program(DC-Shunt Motor)

0 comments
Python(DC-Shunt Motor)
DC-Shunt Motor is used for various industrial applications for doing specific purpose.
The following program Simulates the various parameters, by substituting the values given by user Inputs.

Program------------
import numpy as np
import math
import matplotlib.pyplot as plot
import matplotlib.gridspec as gridspec

'''
--DC Shunt Motor---CopyRight--X--Pankaj Aswal------
  +|---Il----|--------Ish-|
    |        Ra+             |
V ----    ( M )             |
    --           |_           Rsh
    |          Ia           |
   -|---------|------------|
----------------- X -------------------------------
'''
K = 100
V = int(input("Enter the value of Voltage : ", ))
print(V)
Eb = int(input("Enter the value of Back EMF : ", ))
print(Eb)
Ra = int(input("Enter the value of Armature Resistance : ", ))
print(Ra)
Rsh = int(input("Enter the value of Field Resistance : ", ))
print(Rsh)
Flx = int(input("Enter the value of Flux : ",))
print(Flx)
Armature_Current = (V - Eb) * (1/Ra)
Field_Current = (V/Rsh)
Load_Current = Armature_Current + Field_Current
Torque = K * Flx * Armature_Current
Speed = K * (Eb/Flx)
print("Load_Current :", Load_Current)
print("Armature_Current :",Armature_Current )
print("Field_Current :",Field_Current )
print("Torque :", Torque)
Input_power = V * Armature_Current
print("Input_power :", Input_power)
Output_power = Eb * Armature_Current
print("Output_power :", Output_power)
efficency = (Output_power/Input_power) * 100
print("efficency :", efficency)
plot.plot(Input_power,efficency,'+')
plot.xlabel('Input_power[Pi]')
plot.ylabel('efficency[E]');
plot.grid(True,which='both')
plot.axhline(y=0,color='blue', marker = "H")
plot.title('E Vs Pi')
figure = plot.figure()
w = 10
h = 10
d = 55
plot.figure(figsize=(w,h),dpi=d)
plot.plot(Torque,Armature_Current,'D')
plot.plot(Speed,Armature_Current,'8')
plot.plot(Field_Current,Armature_Current,'s')
plot.plot(Load_Current,Field_Current,'P')
figure.tight_layout()
plot.grid(True,which='both')
plot.axhline(y=0,color='red', marker = "o")
plot.title('DC Shunt Motor')

plot.show()

OUTPUT
1.
Enter the value of Voltage : 220
220
Enter the value of Back EMF : 100
100
Enter the value of Armature Resistance : 10
10
Enter the value of Field Resistance : 3
3
Enter the value of Flux : 20
20
Load_Current : 85.33333333333333
Armature_Current : 12.0
Field_Current : 73.33333333333333
Torque : 24000.0
Input_power : 2640.0
Output_power : 1200.0
efficency : 45.45454545454545

2.Plots





















3.Cmd Output

No comments:

Post a Comment