Project 2: Frequency Response of Series RLC Circuit
Overview

The purpose of this project is to give you some experience compute the fundamental quality of a series RLC circuit and learning how to use Visual Studio 2010/2012/2013 to write an user interface.

Step

user-interface (1).jpg

The top figure shows the user interface for this project. You can get the skeleton of the code.

Get the skeletonof the VS2012 code.

Get the skeletonof the VS2013 code.

  • You need to write the computation code of I, Vo, and Z for a specific frequency in CalcAndDraw.cpp which contain the following codes:

//****************************************************************************
//
// * Calculate the current, voltage and impedance for a RLC circuit at specific frequncy
//============================================================================
void Calculate(double R, double L, double C, double f, 
               double& I, double& Vo, double& Z)
//============================================================================
{
        // TODO
        I = Vo = Z = 0;
}

  • You also need to write the frequency response of I, Vo, and Z in CalcAndDraw.cpp which contain the following codes

//****************************************************************************
//
// * Compute the current, voltage and impedance frequency response
//   nSamplePerLogUnit is the number of samples in each unit
//   e.g. nSampleperLogUnit = 6 means you need have 6 uniform space computation 
//   between log1 and log10
//============================================================================
void FequencyResponse(double R, double L, double C, int nSamplePerLogUnit, 
               vector<double>& f_res, vector<double>& I_res, vector<double>& Vo_res,
               vector<double>& Z_res)
//============================================================================
{

}

How will we grade it?

You will send a rar files containing only CalcAndDraw.cpp and RLC_Circuit.exe to TA. We will grade your code accordingly and check whether you have copied others' code.

Upload to “FTP:140.118.127.122” Project 2 folder

Log-in:EE2015

Password:ee2015

Folder type:B103XXXXX_Project2.zip