Last laptop commit of 6th semester
This commit is contained in:
parent
3a4509f40a
commit
b2e1710dcf
BIN
6th-Semester-Spring-2024/DSP/Quizzes/FinalExam/answer_sheet.docx
Normal file
BIN
6th-Semester-Spring-2024/DSP/Quizzes/FinalExam/answer_sheet.docx
Normal file
Binary file not shown.
@ -0,0 +1,38 @@
|
||||
import numpy as np
|
||||
import scipy.signal
|
||||
|
||||
def shifter(matrix):
|
||||
last = matrix[len(matrix)-1]
|
||||
x = len(matrix)
|
||||
result = [0] * x
|
||||
for i in range(1,len(matrix)):
|
||||
result[i] = matrix[i-1]
|
||||
result[0] = last
|
||||
return result
|
||||
|
||||
def circular_convolve(x,h,n,m):
|
||||
primary_matrix = np.zeros((max(n,m),max(n,m)))
|
||||
for i in range(0,len(primary_matrix[0])):
|
||||
primary_matrix[0][i] = x[i]
|
||||
for i in range(1,max(n,m)):
|
||||
primary_matrix[i] = shifter(primary_matrix[i-1])
|
||||
ultimate_matrix = np.transpose(primary_matrix)
|
||||
difference_in_length = abs(n-m)
|
||||
for i in range(m,m+difference_in_length):
|
||||
h.append(0)
|
||||
resultant = np.dot(ultimate_matrix,h)
|
||||
return resultant
|
||||
|
||||
X = np.ones(10)
|
||||
X[0] += 2
|
||||
H = np.zeros(10)
|
||||
H[0] += 1
|
||||
|
||||
y = np.fft.ifft(H*X)
|
||||
print(np.sum(y))
|
||||
|
||||
#lin_conv = scipy.signal.fftconvolve(x,h,"full")
|
||||
#circ_conv = circular_convolve(x, h, len(x), len(x))
|
||||
#
|
||||
#print(f"Linear convolution: {lin_conv}")
|
||||
#print(f"Circular convolution: {circ_conv}")
|
BIN
6th-Semester-Spring-2024/EnI/Group Work/RUFIT-01.png
Normal file
BIN
6th-Semester-Spring-2024/EnI/Group Work/RUFIT-01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
BIN
6th-Semester-Spring-2024/EnI/Group Work/RUFIT-01.xcf
Normal file
BIN
6th-Semester-Spring-2024/EnI/Group Work/RUFIT-01.xcf
Normal file
Binary file not shown.
BIN
6th-Semester-Spring-2024/EnI/Group Work/RUFIT-02.xcf
Normal file
BIN
6th-Semester-Spring-2024/EnI/Group Work/RUFIT-02.xcf
Normal file
Binary file not shown.
Binary file not shown.
@ -1,10 +1,12 @@
|
||||
Tu = 0.2
|
||||
Ku = 0.022
|
||||
|
||||
# Ziegler-Nichols PID Tune
|
||||
Kp_pid = 0.6*Ku
|
||||
Ki_pid = 1.2*Ku/Tu
|
||||
Kd_pid = 0.075*Ku*Tu
|
||||
|
||||
# Ziegler-Nichols No OS
|
||||
Kp_no_os = 0.2*Ku
|
||||
Ki_no_os = 0.4*Ku/Tu
|
||||
Kd_no_os = 0.066*Ku*Tu
|
||||
|
Loading…
Reference in New Issue
Block a user