0% found this document useful (0 votes)
25 views2 pages

Python Step Response Analysis

The document contains Python code for simulating the step response of a thermal reheat unit using control theory. It defines parameters for the turbine and a PID controller, constructs the transfer functions, and computes the closed-loop system response. Finally, it plots the step response over a specified time range.

Uploaded by

himanidalwadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Python Step Response Analysis

The document contains Python code for simulating the step response of a thermal reheat unit using control theory. It defines parameters for the turbine and a PID controller, constructs the transfer functions, and computes the closed-loop system response. Finally, it plots the step response over a specified time range.

Uploaded by

himanidalwadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

import numpy as np

import [Link] as plt

import control as ctrl

# Thermal Reheat Unit Parameters

Kt = 1 # Turbine gain

Tt = 0.3 # Main turbine time constant

Tr = 10 # Reheat time constant

Kp = 1 # Proportional gain

Ki = 0.5 # Integral gain

Kd = 0.1 # Derivative gain

# Turbine Transfer Function

Gt_num = [Kt * (Tr + Tt), Kt] # Numerator coefficients

Gt_den = [Tt * Tr, (Tt + Tr), 1] # Denominator coefficients

Gt = [Link](Gt_num, Gt_den)

# PID Controller

Gc_num = [Kd, Kp, Ki]

# PID numerator (Derivative, Proportional, Integral)

Gc_den = [1, 0]

Gc = [Link](Gc_num, Gc_den)

# Closed-Loop System

Gol = [Link](Gc, Gt)

Gcl = [Link](Gol, 1)

# Step Response

time = [Link](0, 50, 500) # Time range


time, response = ctrl.step_response(Gcl, time)

# Plotting the Response

[Link](figsize=(8, 5))

[Link](time, response, label="Step Response")

[Link]('Python Step Response for LFC', fontsize=14)

[Link]('Time (s)', fontsize=12)

[Link]('Frequency Deviation (Hz)', fontsize=12)

[Link]()

[Link]()

[Link]()

You might also like