FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download PTU B-Tech EEE 2020 Dec 3rd Sem 76463 Electrical Circuit Analysis Question Paper

Download PTU (I.K.Gujral Punjab Technical University (IKGPTU)) B-Tech (Bachelor of Technology) (EEE)- Electrical And Electronics Engineering 2020 December 3rd Sem 76463 Electrical Circuit Analysis Previous Question Paper

This post was last modified on 13 February 2021

PTU B.Tech Question Papers 2020 December (All Branches)


FirstRanker.com

Roll No. Total No. of Pages : 03
Total No. of Questions : 18

--- Content provided by​ FirstRanker.com ---

B.Tech. (Electrical & Electronics Engg. / Electronics & Electrical)
(2018 Batch) (Sem.=3)
ELECTRICAL CIRCUIT ANALYSIS
Subject Code : BTEEE-301-18
M.Code : 76463

--- Content provided by FirstRanker.com ---

Time : 3 Hrs. Max. Marks : 60

INSTRUCTIONS TO CANDIDATES :

  1. SECTION-A is COMPULSORY consisting of TEN questions carrying TWO marks each.
  2. SECTION-B contains FIVE questions carrying FIVE marks each and students have to attempt any FOUR questions.
  3. SECTION-C contains THREE questions carrying TEN marks each and students have to attempt any TWO questions.
  4. --- Content provided by‍ FirstRanker.com ---

SECTION-A

Write briefly :

  1. State Reciprocity Theorem and its application.
  2. What is coefficient of coupling?
  3. Write various applications of filters?
  4. --- Content provided by‍ FirstRanker.com ---

  5. What are open circuit parameters? Give the equivalent circuit.
  6. State advantages of 3-phase machines over 1-phase machines.
  7. The coupled coil with L1 = 3H, L2 = 1mH and K = 0.5 are connected in series additive arrangement. Calculate the equivalent inductance.
  8. What do you mean by duality network?
  9. What is the difference between network synthesis and network analysis?
  10. --- Content provided by‍ FirstRanker.com ---

  11. Give the condition for selecting the resonant frequency in m-derived high pass and low-pass filters.
  12. What do you mean by immittance?

FirstRanker.com

SECTION-B

  1. For the given two port network calculate the short circuit parameters of Fig. 1.

    --- Content provided by​ FirstRanker.com ---

    #include
    #include using namespace std; // Structure to represent a process
    struct Process { int id; int arrivalTime; int burstTime; int completionTime; int turnaroundTime; int waitingTime;
    }; // Function to calculate completion time, turnaround time, and waiting time for each process
    void calculateTimes(vector& processes) { int currentTime = 0; for (int i = 0; i < processes.size(); ++i) { currentTime += processes[i].burstTime; firstranker.completionTime = currentTime; processes[i].turnaroundTime = firstranker.completionTime - processes[i].arrivalTime; processes[i].waitingTime = processes[i].turnaroundTime - processes[i].burstTime; }

    --- Content provided by‍ FirstRanker.com ---

    } // Function to sort processes by arrival time
    bool compareByArrivalTime(const Process& a, const Process& b) { return a.arrivalTime < b.arrivalTime;
    } // Function to sort processes by burst time (for SJF)
    bool compareByBurstTime(const Process& a, const Process& b) { return a.burstTime < b.burstTime;
    } // Function to perform First-Come, First-Served (FCFS) scheduling

    --- Content provided by⁠ FirstRanker.com ---

    void fcfs(vector processes) { sort(processes.begin(), processes.end(), compareByArrivalTime); calculateTimes(processes); cout << "FCFS Scheduling:" << endl; cout << "Process\tArrival Time\tBurst Time\tCompletion Time\tTurnaround Time\tWaiting Time" << endl; for (const auto& process : processes) { cout << process.id << "\t\t" << process.arrivalTime << "\t\t" << process.burstTime << "\t\t" << firstranker.completionTime << "\t\t" << process.turnaroundTime << "\t\t" << process.waitingTime << endl; }
    } // Function to perform Shortest Job First (SJF) scheduling
    void sjf(vector processes) { sort(processes.begin(), processes.end(), compareByArrivalTime); vector readyQueue; vector completedProcesses; int currentTime = 0; while (completedProcesses.size() < processes.size()) { // Add processes to the ready queue that have arrived for (int i = 0; i < processes.size(); ++i) { if (processes[i].arrivalTime <= currentTime && find_if(readyQueue.begin(), readyQueue.end(), [&](const Process& p){ return p.id == processes[i].id; }) == readyQueue.end() && find_if(completedProcesses.begin(), completedProcesses.end(), [&](const Process& p){ return p.id == processes[i].id; }) == completedProcesses.end()) { readyQueue.push_back(processes[i]); } } // If the ready queue is empty, increment the current time and continue if (readyQueue.empty()) { currentTime++; continue; } // Sort the ready queue by burst time sort(readyQueue.begin(), readyQueue.end(), compareByBurstTime); // Select the process with the shortest burst time Process shortestJob = readyQueue[0]; readyQueue.erase(readyQueue.begin()); // Update the current time and calculate completion time, turnaround time, and waiting time currentTime += shortestJob.burstTime; firstranker.completionTime = currentTime; shortestJob.turnaroundTime = firstranker.completionTime - shortestJob.arrivalTime; shortestJob.waitingTime = shortestJob.turnaroundTime - shortestJob.burstTime; // Add the completed process to the completed processes vector completedProcesses.push_back(shortestJob); } cout << "SJF Scheduling:" << endl; cout << "Process\tArrival Time\tBurst Time\tCompletion Time\tTurnaround Time\tWaiting Time" << endl; for (const auto& process : completedProcesses) { cout << process.id << "\t\t" << process.arrivalTime << "\t\t" << process.burstTime << "\t\t" << firstranker.completionTime << "\t\t" << process.turnaroundTime << "\t\t" << process.waitingTime << endl; }
    } int main() { int n; cout << "Enter the number of processes: "; cin >> n; vector processes(n); for (int i = 0; i < n; ++i) { processes[i].id = i + 1; cout << "Enter arrival time for process " << i + 1 << ": "; cin >> processes[i].arrivalTime; cout << "Enter burst time for process " << i + 1 << ": "; cin >> processes[i].burstTime; } fcfs(processes); cout << endl; sjf(processes); return 0;
    } **Explanation:** 1. **Includes:** * ``: For input/output operations (like `cout` and `cin`). * ``: For using dynamic arrays (vectors) to store processes. * ``: For sorting algorithms (`sort`) and other useful functions. 2. **`Process` struct:** * Defines a structure to hold information about each process: * `id`: Process identifier. * `arrivalTime`: The time the process arrives in the ready queue. * `burstTime`: The time required to execute the process. * `completionTime`: The time the process finishes execution. * `turnaroundTime`: The time from arrival to completion (completionTime - arrivalTime). * `waitingTime`: The time the process spends waiting in the ready queue (turnaroundTime - burstTime). 3. **`calculateTimes(vector& processes)` function:** * Calculates the `completionTime`, `turnaroundTime`, and `waitingTime` for each process in the given vector. * It assumes the processes are already in the order they will be executed. * `currentTime` keeps track of the current time in the simulation. 4. **`compareByArrivalTime(const Process& a, const Process& b)` function:** * A comparison function used by `sort` to sort processes based on their arrival time. It returns `true` if `a` should come before `b` in the sorted order (i.e., `a` has an earlier arrival time). 5. **`compareByBurstTime(const Process& a, const Process& b)` function:** * A comparison function used by `sort` to sort processes based on their burst time. It returns `true` if `a` should come before `b` in the sorted order (i.e., `a` has a shorter burst time). 6. **`fcfs(vector processes)` function:** * Implements the First-Come, First-Served (FCFS) scheduling algorithm. * It first sorts the processes by arrival time using `sort` and `compareByArrivalTime`. * Then, it calls `calculateTimes` to calculate the completion, turnaround, and waiting times. * Finally, it prints the results in a table format. 7. **`sjf(vector processes)` function:** * Implements the Shortest Job First (SJF) scheduling algorithm. * It first sorts the processes by arrival time using `sort` and `compareByArrivalTime`. * It uses a `readyQueue` (a vector) to hold processes that have arrived and are ready to be executed. * It uses a `completedProcesses` vector to store the processes that have finished execution. * The `while` loop continues until all processes have been completed. * Inside the loop: * It adds processes to the `readyQueue` that have arrived by comparing `arrivalTime` with `currentTime`. * If the `readyQueue` is empty, it increments `currentTime` and continues to the next iteration. * It sorts the `readyQueue` by burst time using `sort` and `compareByBurstTime`. * It selects the process with the shortest burst time from the `readyQueue`. * It updates `currentTime` and calculates the completion, turnaround, and waiting times for the selected process. * It adds the completed process to the `completedProcesses` vector. * Finally, it prints the results in a table format. 8. **`main()` function:** * Prompts the user to enter the number of processes. * Creates a `vector` to store the processes. * Prompts the user to enter the arrival time and burst time for each process. * Calls the `fcfs` and `sjf` functions to perform the scheduling algorithms. * Returns 0 to indicate successful execution. **How to Compile and Run:** 1. **Save:** Save the code as a `.cpp` file (e.g., `scheduling.cpp`).

    --- Content provided by‌ FirstRanker.com ---

    2. **Compile:** Open a terminal or command prompt and use a C++ compiler (like g

    This download link is referred from the post: PTU B.Tech Question Papers 2020 December (All Branches)

--- Content provided by⁠ FirstRanker.com ---