Contents
clc
clear all
IDENTIFICATION
Name: Autar Kaw (Put your name here) Section : 001 (Put Section here) Semester: Fall 2011 Due Date & Time: August 29, 2011 (Put due data and time here)
disp('Name: Autar Kaw (Put your name here)') disp('Section : 001 (Put Section here)') disp('Semester: Fall 2011') disp('Due Date & Time: August 29, 2011 (Put due data and time here)')
Name: Autar Kaw (Put your name here) Section : 001 (Put Section here) Semester: Fall 2011 Due Date & Time: August 29, 2011 (Put due data and time here)
BACKGROUND and DESCRIPTION
Title: The secondary voltage in a transformer can be found by using the relation, vs/ns =vp/np. where, vs= voltage in the secondary winding ns= number of secondary windings vp= voltage in the primary winding np= number of primary windings
% After finding the voltage, current can be found by using the ohms law, % I=V/R % where, % I= current flow % V=Voltage across the terminal % R= Resistance of the material disp('This program finds the secondary voltage and secondary current in a Transformer')
This program finds the secondary voltage and secondary current in a Transformer
INPUTS AND DISPLAY INPUTS
% primary voltage, vp (volts) vp=12; % resistance value, r (ohms) r=100; % primary windings, np np=6; % secondary windings, ns ns=3; fprintf(' The primary voltage is %g V\n',vp) fprintf(' The secondary resistance is %g ohms\n',r) fprintf(' There are %g primary windings\n',np) fprintf(' There are %g secondary windings\n\n',ns)
The primary voltage is 12 V The secondary resistance is 100 ohms There are 6 primary windings There are 3 secondary windings
CODE
vs=(ns/np)*vp; I =(vs/r);
DISPLAY OUTPUT
fprintf(' The secondary voltage is %g V\n',vs) fprintf(' The secondary current is %g amps\n',I)
The secondary voltage is 6 V The secondary current is 0.06 amps