Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Matlab code please Check if CalculateCombinedImpedance(1.2, 10e-3, 1e-3) returns

ID: 2084023 • Letter: M

Question

Matlab code please

Check if CalculateCombinedImpedance(1.2, 10e-3, 1e-3) returns 3.1401 - j5.5757.

Check if CalculateCombinedImpedance(75, 1e-9, 1e-12) returns approximately 75.

Calculating impedance. Impedance is a useful concept in many engineering disciplines, especially for analyzing electrical circuits when the applied voltages or currents are sinusoids. Impedance is a complex number that represents the ability of a circuit element or combination of elements to oppose sinusoidal electric current. Impedance has the same units as resistance, or ohms d). The impedance of various circuit elements can be calculated as follows: Inductor's impedance: 2nductor jaL, where J is the imaginary unit s the sinusoid's frequency, and s the inductance capacitor jaoC where J is the imaginary unit is the sinusoid's frequency, and C s the Capacitor's impedance: capacitance Resistor's impedance Zresistor R where R s the resistance Two impedances 1 and Z, can be combined in many different ways. The simpliest combintations are in series or in parallel. Two impedances in series 'series parallel Z Zo Two impedances in parallel:

Explanation / Answer

%Matlab code to compute the impedance of motor%

function CalculateCombinedImpedance(motorResistance,motorInductance,capacitorCapacitance)

w=377;           %gridfrequency in rad/s

R=motorResistance;  

L=motorInductance;

C=capacitorCapacitance;

Z1=motorImpedance;

motorImpedance=R+i*w*L; % series connection of motor resistance and inductance

Z2=CapacitorImpedance;

CapacitorImpedance=1/(i*w*C);

CombinedImpedance=Z;

Z=(Z1*Z2)/(Z1+Z2);

end